lkml.org 
[lkml]   [2008]   [Aug]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] ath9k: remove useless if-before-kfree; correct misleading indentation
From
Date
Hi Jim,

> >> Alternatively, you could remove the nowadays-useless
> >> "if-before-kfree" test and leave the sometimes-redundant
> >> assignment as-is: unconditional.
> >
> > actually the later one is preferred. Just remove the NULL check.
>
> I prefer it, too, but the indentation suggested that
> adding braces would match the author's intent.
>
> In case anyone is interested, I have been maintaining a patch
> that removes *all* useless if-before-kfree tests. I have not
> posted it because such changes have a reputation for provoking
> flames on this list, but now you've provoked me ;-)
>
> http://meyering.net/code/remove-useless-if-before-kfree.patch
> 74 files changed, 127 insertions(+), 250 deletions(-)

I am all for this patch.

Even the Glibc free() function will do an "if-before-free" :)

Regards

Marcel




\
 
 \ /
  Last update: 2008-08-23 13:05    [W:0.042 / U:0.000 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site