Skip to contentSkip to conversation

fs/binfmt_elf.c: fill_note_info: Reduce scope of a variable

PATCH New Geyslan G. Bem 1 participant 1 message Sep 27, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fs/binfmt_elf.c: fill_note_info: Reduce scope of a variable

The *t variable in the fill_note_info function is only used if siginfo->si_signo isn't 0. Moving "t" pointer to that inner scope.

Tested.

---
 fs/binfmt_elf.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
fs/binfmt_elf.c +1 -2
index 100edcc..d0ac15b 100644
@@ -1848,12 +1848,11 @@ static int fill_note_info(struct elfhdr *elf, int phdrs,
 			  struct elf_note_info *info,
 			  siginfo_t *siginfo, struct pt_regs *regs)
 {
-	struct list_head *t;
-
 	if (!elf_note_info_init(info))
 		return 0;
 
 	if (siginfo->si_signo) {
+		struct list_head *t;
 		struct core_thread *ct;
 		struct elf_thread_status *ets;
 
Signature · 1 line
1.8.4