From: Vitaly Mayatskikh <v.mayatskih@gmail.com>
To: "Kirill A. Shutemov" <kirill@shutemov.name>
Cc: Vitaly Mayatskikh <v.mayatskih@gmail.com>,
linux-kernel@vger.kernel.org, Pavel Emelianov <xemul@openvz.org>
Subject: Re: [PATCH] Remove double initialization of retval in load_misc_binary()
Date: Wed, 08 Apr 2009 09:56:29 +0200 [thread overview]
Message-ID: <871vs3lgsy.wl%vmayatsk@redhat.com> (raw)
In-Reply-To: <cc557aab0904080032u5b468d56v836a4332434c7d78@mail.gmail.com>
At Wed, 8 Apr 2009 10:32:48 +0300, Kirill A. Shutemov wrote:
> Probably, better way is removing both 'retval = -ENOEXEC;' and initialize it within definition.
Agree.
Signed-off-by: Vitaly Mayatskikh <v.mayatskih@gmail.com>
diff --git a/fs/binfmt_misc.c b/fs/binfmt_misc.c
index c4e8353..f10150f 100644
--- a/fs/binfmt_misc.c
+++ b/fs/binfmt_misc.c
@@ -109,14 +109,12 @@ static int load_misc_binary(struct linux_binprm *bprm, struct pt_regs *regs)
struct file * interp_file = NULL;
char iname[BINPRM_BUF_SIZE];
char *iname_addr = iname;
- int retval;
+ int retval = -ENOEXEC;
int fd_binary = -1;
- retval = -ENOEXEC;
if (!enabled)
goto _ret;
- retval = -ENOEXEC;
if (bprm->recursion_depth > BINPRM_MAX_RECURSION)
goto _ret;
--
wbr, Vitaly
next parent reply other threads:[~2009-04-08 7:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <87ljqcmsjs.wl%vmayatsk@redhat.com>
[not found] ` <cc557aab0904080032u5b468d56v836a4332434c7d78@mail.gmail.com>
2009-04-08 7:56 ` Vitaly Mayatskikh [this message]
2009-04-10 21:36 ` [PATCH] Remove double initialization of retval in load_misc_binary() Andrew Morton
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=871vs3lgsy.wl%vmayatsk@redhat.com \
--to=v.mayatskih@gmail.com \
--cc=kirill@shutemov.name \
--cc=linux-kernel@vger.kernel.org \
--cc=xemul@openvz.org \
/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