From: Riina Kikas <riinak@ut.ee>
To: linux-kernel@vger.kernel.org
Cc: mroos@ut.ee
Subject: [PATCH 2.6] clean-up: fixes "shadows local" warning
Date: Mon, 6 Dec 2004 22:51:06 +0200 (EET) [thread overview]
Message-ID: <Pine.SOC.4.61.0412062249010.21075@math.ut.ee> (raw)
This patch fixes warning "declaration of `err' shadows a previous local"
occuring on line 486
Signed-off-by: Riina Kikas <Riina.Kikas@mail.ee>
--- a/fs/exec.c 2004-11-30 19:43:52.000000000 +0000
+++ b/fs/exec.c 2004-12-04 12:05:58.000000000 +0000
@@ -483,17 +483,17 @@
file = ERR_PTR(-EACCES);
if (!(nd.mnt->mnt_flags & MNT_NOEXEC) &&
S_ISREG(inode->i_mode)) {
- int err = permission(inode, MAY_EXEC, &nd);
- if (!err && !(inode->i_mode & 0111))
- err = -EACCES;
- file = ERR_PTR(err);
- if (!err) {
+ int perm_err = permission(inode, MAY_EXEC, &nd);
+ if (!perm_err && !(inode->i_mode & 0111))
+ perm_err = -EACCES;
+ file = ERR_PTR(perm_err);
+ if (!perm_err) {
file = dentry_open(nd.dentry, nd.mnt, O_RDONLY);
if (!IS_ERR(file)) {
- err = deny_write_access(file);
- if (err) {
+ perm_err = deny_write_access(file);
+ if (perm_err) {
fput(file);
- file = ERR_PTR(err);
+ file = ERR_PTR(perm_err);
}
}
out:
reply other threads:[~2004-12-06 20:51 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=Pine.SOC.4.61.0412062249010.21075@math.ut.ee \
--to=riinak@ut.ee \
--cc=linux-kernel@vger.kernel.org \
--cc=mroos@ut.ee \
/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
all inboxes | Powered by JetHome®