lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <47CAF5FB.4070204@gmail.com>
Date:	Sun, 02 Mar 2008 21:46:19 +0300
From:	Dmitri Vorobiev <dmitri.vorobiev@...il.com>
To:	Harvey Harrison <harvey.harrison@...il.com>
CC:	Mauro Carvalho Chehab <mchehab@...radead.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] saa7146: fix sparse warnings

Harvey Harrison пишет:
> On Sun, 2008-03-02 at 20:34 +0300, Dmitri Vorobiev wrote:
>> Harvey Harrison пишет:
>>>  
>>> -	if( 0 != (dev->ext)) {
>>> +	if( NULL != (dev->ext)) {
>> At the risk of looking an idiot, I'm taking a liberty to ask what is
>> the point in explicit comparison to zero in conditional operators? Is
>> it not a fundamental C idiom to write
> 
> <snip>
> 
> Yes, that's how I would have written it, but I tried to keep with the
> prevailing style in that file.  I suppose I could see an argument for
> consistency if you had a long series of if() statements to keep a
> similar style.

To me it looks that the original style in this file can be sacrificed
in favor of

1) satisfying the coding style rules of the kernel;
2) keeping with informal, but commonly known idioms of C language.

So I thought that while you're at it, you could also comb through
this file and make the checkpatch.pl script happy with it.

But this is just my very personal opinion :)

Dmitri

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ