lkml.org 
[lkml]   [2014]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] checkpatch giving bogus advice (was staging: goldfish: Fix minor coding style)
I haven't seen any bugs caused by lack of type safety with "!foo"...
I prefer !foo because it is more common in the kernel and I think it's
easier to read but I don't feel strongly about this.

I kind of hate "if (foo != NULL) though, because it's a double negative.
But I really hate when people start adding the "!= 0" on to all their
conditions.

if (frob() != 0)

Also:

if (a + b != 0)

People do this all the time instead of "if (a || b)" and I don't know
why...

regards,
dan carpenter



\
 
 \ /
  Last update: 2014-12-15 13:41    [W:0.071 / U:0.428 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site