mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Geyslan G. Bem" <geyslan@gmail.com>
To: viro@zeniv.linux.org.uk
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Geyslan G. Bem" <geyslan@gmail.com>
Subject: [PATCH 1/1] fs/binfmt_elf.c: fill_note_info: Reduce scope of a variable
Date: Fri, 27 Sep 2013 09:58:12 -0300	[thread overview]
Message-ID: <1380286692-21567-1-git-send-email-geyslan@gmail.com> (raw)

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.

Signed-off-by: Geyslan G. Bem <geyslan@gmail.com>
---
 fs/binfmt_elf.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
index 100edcc..d0ac15b 100644
--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -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;
 
-- 
1.8.4


             reply	other threads:[~2013-09-27 13:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-27 12:58 Geyslan G. Bem [this message]
2013-09-28 23:32 [PATCH] 9p: remove unused 'p9_fid' struct pointer Geyslan G. Bem
2013-09-28 23:32 ` [PATCH 1/1] fs/binfmt_elf.c: fill_note_info: Reduce scope of a variable Geyslan G. Bem
2013-09-28 23:42   ` Geyslan Gregório Bem

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1380286692-21567-1-git-send-email-geyslan@gmail.com \
    --to=geyslan@gmail.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome