From: Richard Knutsson <ricknu-0@student.ltu.se>
To: Jan Engelhardt <jengelh@computergmbh.de>
Cc: Al Viro <viro@ftp.linux.org.uk>,
Yoann Padioleau <padator@wanadoo.fr>,
kernel-janitors@vger.kernel.org, rmk@arm.linux.org.uk,
akpm@linux-foundation.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 02/68] 0 -> NULL, for arch/arm
Date: Tue, 31 Jul 2007 12:19:27 +0000 [thread overview]
Message-ID: <46AF28CF.6000302@student.ltu.se> (raw)
In-Reply-To: <Pine.LNX.4.64.0707271250020.12711@fbirervta.pbzchgretzou.qr>
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
prev parent reply other threads:[~2007-07-31 12:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-27 9:44 [PATCH 02/68] 0 -> NULL, for arch/arm Yoann Padioleau
2007-07-27 9:59 ` Al Viro
2007-07-27 10:18 ` Russell King
2007-07-27 10:50 ` Jan Engelhardt
2007-07-27 12:07 ` Alexey Dobriyan
2007-07-27 12:18 ` Jan Engelhardt
2007-07-27 12:30 ` Al Viro
2007-07-31 12:19 ` Richard Knutsson [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=46AF28CF.6000302@student.ltu.se \
--to=ricknu-0@student.ltu.se \
--cc=akpm@linux-foundation.org \
--cc=jengelh@computergmbh.de \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=padator@wanadoo.fr \
--cc=rmk@arm.linux.org.uk \
--cc=viro@ftp.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).