diff options
author | Denis Kirjanov <dkirjanov@kernel.org> | 2011-03-23 23:43:08 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-24 02:46:50 (GMT) |
commit | 814ecf6e5b7854504ae83255173e53836c5d8420 (patch) | |
tree | 0e6ba9405264833b672b5b640aadc93e4050d56d /kernel | |
parent | ad4ac17ad1e2f0bd0ce38b2585c5d7fa2b0780dc (diff) | |
download | linux-814ecf6e5b7854504ae83255173e53836c5d8420.tar.xz |
sysctl_check: drop table->procname checks
Since the for loop checks for the table->procname drop useless
table->procname checks inside the loop body
Signed-off-by: Denis Kirjanov <dkirjanov@kernel.org>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/sysctl_check.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/kernel/sysctl_check.c b/kernel/sysctl_check.c index 10b90d8..3a01c3e 100644 --- a/kernel/sysctl_check.c +++ b/kernel/sysctl_check.c @@ -111,11 +111,9 @@ int sysctl_check_table(struct nsproxy *namespaces, struct ctl_table *table) const char *fail = NULL; if (table->parent) { - if (table->procname && !table->parent->procname) + if (!table->parent->procname) set_fail(&fail, table, "Parent without procname"); } - if (!table->procname) - set_fail(&fail, table, "No procname"); if (table->child) { if (table->data) set_fail(&fail, table, "Directory with data?"); @@ -144,7 +142,7 @@ int sysctl_check_table(struct nsproxy *namespaces, struct ctl_table *table) set_fail(&fail, table, "No maxlen"); } #ifdef CONFIG_PROC_SYSCTL - if (table->procname && !table->proc_handler) + if (!table->proc_handler) set_fail(&fail, table, "No proc_handler"); #endif #if 0 |