[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1307030444-7095-1-git-send-email-lucas.demarchi@profusion.mobi>
Date: Thu, 2 Jun 2011 13:00:44 -0300
From: Lucas De Marchi <lucas.demarchi@...fusion.mobi>
To: "Eric W. Biederman" <ebiederm@...ssion.com>
Cc: Jesper Juhl <jj@...osbits.net>, linux-kernel@...r.kernel.org,
Nick Piggin <npiggin@...nel.dk>,
Christoph Hellwig <hch@....de>,
Al Viro <viro@...iv.linux.org.uk>,
Lucas De Marchi <lucas.demarchi@...fusion.mobi>
Subject: [PATCH] sysctl: remove impossible condition check
Signed-off-by: Lucas De Marchi <lucas.demarchi@...fusion.mobi>
---
fs/proc/proc_sysctl.c | 14 ++------------
1 files changed, 2 insertions(+), 12 deletions(-)
diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c
index f50133c..6cbcb1e 100644
--- a/fs/proc/proc_sysctl.c
+++ b/fs/proc/proc_sysctl.c
@@ -49,17 +49,11 @@ out:
static struct ctl_table *find_in_table(struct ctl_table *p, struct qstr *name)
{
- int len;
for ( ; p->procname; p++) {
-
- if (!p->procname)
- continue;
-
- len = strlen(p->procname);
- if (len != name->len)
+ if (strlen(p->procname) != name->len)
continue;
- if (memcmp(p->procname, name->name, len) != 0)
+ if (memcmp(p->procname, name->name, name->len) != 0)
continue;
/* I have a match */
@@ -223,10 +217,6 @@ static int scan(struct ctl_table_header *head, ctl_table *table,
for (; table->procname; table++, (*pos)++) {
int res;
- /* Can't do anything without a proc name */
- if (!table->procname)
- continue;
-
if (*pos < file->f_pos)
continue;
--
1.7.5.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists