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] [day] [month] [year] [list]
Date:	Tue, 31 Jul 2007 14:19:27 +0200
From:	Richard Knutsson <ricknu-0@...dent.ltu.se>
To:	Jan Engelhardt <jengelh@...putergmbh.de>
CC:	Al Viro <viro@....linux.org.uk>,
	Yoann Padioleau <padator@...adoo.fr>,
	kernel-janitors@...r.kernel.org, rmk@....linux.org.uk,
	akpm@...ux-foundation.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 02/68] 0 -> NULL, for arch/arm

Jan Engelhardt wrote:
> On Jul 27 2007 10:59, Al Viro wrote:
>   
>> On Fri, Jul 27, 2007 at 11:44:07AM +0200, Yoann Padioleau wrote:
>>     
>>>  		buf = alloc_safe_buffer(device_info, ptr, size, dir);
>>> -		if (buf == 0) {
>>> +		if (buf == NULL) {
>>>       
>> 		if (!buf)
>> surely...
>>     
>
> Makes it look like it's used as a bool.
>   
But the conditional checking for a pointer and a boolean is the same; 0 
== NULL == 'false' and the rest is valid/'true'. So IMHO it is a cleaner 
way to write it. But then again, some people like to abuse the '!' on 
"regular" variables.

Richard Knutsson


-
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