]> git.baikalelectronics.ru Git - kernel.git/commit
sysctl: remove impossible condition check
authorLucas De Marchi <lucas.demarchi@profusion.mobi>
Fri, 10 Jun 2011 05:36:05 +0000 (02:36 -0300)
committerEric W. Biederman <ebiederm@xmission.com>
Wed, 25 Jan 2012 00:37:54 +0000 (16:37 -0800)
commit329014a8f12be89c6bd8809826c1917cc8aa4130
tree8f4717d0308045e9478fd6a1a11a3d8153647a72
parent1e5ed5b4d5a9924b9ec96032051e81bc6340728e
sysctl: remove impossible condition check

Remove checks for conditions that will never happen. If procname is NULL
the loop would already had bailed out, so there's no need to check it
again.

At the same time this also compacts the function find_in_table() by
refactoring it to be easier to read.

Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
Reviewed-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
fs/proc/proc_sysctl.c