lkml.org 
[lkml]   [2011]   [Jun]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] sysctl: remove impossible condition check
On Fri, 10 Jun 2011, Lucas De Marchi wrote:

> 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>

Looks good to me.

Reviewed-by: Jesper Juhl <jj@chaosbits.net>

--
Jesper Juhl <jj@chaosbits.net> http://www.chaosbits.net/
Don't top-post http://www.catb.org/jargon/html/T/top-post.html
Plain text mails only, please.



\
 
 \ /
  Last update: 2011-06-10 10:07    [W:0.158 / U:0.312 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site