From 5793432628ad76f93ae4d31c23fb1c26e3d8b525 Mon Sep 17 00:00:00 2001 From: Phil Carmody Date: Thu, 19 Aug 2010 15:10:24 +0100 Subject: [PATCH] ARM: 6338/1: module - simplify code with temporaries Less to read. Signed-off-by: Phil Carmody Acked-by: Catalin Marinas Signed-off-by: Russell King --- arch/arm/kernel/module.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/arch/arm/kernel/module.c b/arch/arm/kernel/module.c index 6b46058..1dae046 100644 --- a/arch/arm/kernel/module.c +++ b/arch/arm/kernel/module.c @@ -71,17 +71,19 @@ int module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *s, *sechdrs_end = sechdrs + hdr->e_shnum; for (s = sechdrs; s < sechdrs_end; s++) { - if (strcmp(".ARM.exidx.init.text", secstrings + s->sh_name) == 0) + char const *secname = secstrings + s->sh_name; + + if (strcmp(".ARM.exidx.init.text", secname) == 0) mod->arch.unw_sec_init = s; - else if (strcmp(".ARM.exidx.devinit.text", secstrings + s->sh_name) == 0) + else if (strcmp(".ARM.exidx.devinit.text", secname) == 0) mod->arch.unw_sec_devinit = s; - else if (strcmp(".ARM.exidx", secstrings + s->sh_name) == 0) + else if (strcmp(".ARM.exidx", secname) == 0) mod->arch.unw_sec_core = s; - else if (strcmp(".init.text", secstrings + s->sh_name) == 0) + else if (strcmp(".init.text", secname) == 0) mod->arch.sec_init_text = s; - else if (strcmp(".devinit.text", secstrings + s->sh_name) == 0) + else if (strcmp(".devinit.text", secname) == 0) mod->arch.sec_devinit_text = s; - else if (strcmp(".text", secstrings + s->sh_name) == 0) + else if (strcmp(".text", secname) == 0) mod->arch.sec_core_text = s; } #endif -- 2.7.4