ldso: remove redundant switch case for REL_NONE

Submitted by Fangrui Song on March 8, 2020, 6:10 p.m.

Details

Message ID 20200308181032.jpojp6bttzwhc4k2@gmail.com
State New
Series "ldso: remove redundant switch case for REL_NONE"
Headers show

Commit Message

Fangrui Song March 8, 2020, 6:10 p.m.
as a result of commit b6a6cd703ffefa6352249fb01f4da28d85d17306,
the REL_NONE case is now redundant.
---
 ldso/dynlink.c | 2 --
 1 file changed, 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/ldso/dynlink.c b/ldso/dynlink.c
index afec985a..6468f203 100644
--- a/ldso/dynlink.c
+++ b/ldso/dynlink.c
@@ -415,8 +415,6 @@  static void do_relocs(struct dso *dso, size_t *rel, size_t rel_size, size_t stri
 		}
 
 		switch(type) {
-		case REL_NONE:
-			break;
 		case REL_OFFSET:
 			addend -= (size_t)reloc_addr;
 		case REL_SYMBOLIC:

Comments

Rich Felker March 20, 2020, 7:46 p.m.
On Sun, Mar 08, 2020 at 11:10:32AM -0700, Fangrui Song wrote:
> as a result of commit b6a6cd703ffefa6352249fb01f4da28d85d17306,
> the REL_NONE case is now redundant.
> ---
>  ldso/dynlink.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/ldso/dynlink.c b/ldso/dynlink.c
> index afec985a..6468f203 100644
> --- a/ldso/dynlink.c
> +++ b/ldso/dynlink.c
> @@ -415,8 +415,6 @@ static void do_relocs(struct dso *dso, size_t *rel, size_t rel_size, size_t stri
>  		}
>  
>  		switch(type) {
> -		case REL_NONE:
> -			break;
>  		case REL_OFFSET:
>  			addend -= (size_t)reloc_addr;
>  		case REL_SYMBOLIC:
> -- 
> 2.25.1

Thanks, applying.

Rich