[PATCH 2.6] clean-up: fixes "shadows local" warning

From: Riina Kikas
Date: Mon Dec 06 2004 - 15:52:54 EST


This patch fixes warning "declaration of `err' shadows a previous local"
occuring on line 486

Signed-off-by: Riina Kikas <Riina.Kikas@xxxxxxx>

--- 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:
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/