From: Roland Dreier <rdreier@cisco.com>
To: James Carlson <carlsonj@workingcode.com>
Cc: Alexey Dobriyan <adobriyan@gmail.com>,
Al Viro <viro@ftp.linux.org.uk>,
netdev@vger.kernel.org, linux-ppp@vger.kernel.org
Subject: Re: [PATCH] ppp: don't use 0 in pointer context
Date: Wed, 08 Feb 2006 14:23:56 -0800 [thread overview]
Message-ID: <ada8xslbibn.fsf@cisco.com> (raw)
In-Reply-To: <17386.27957.822041.83512@gargle.gargle.HOWL> (James Carlson's message of "Wed, 8 Feb 2006 17:14:13 -0500")
James> And the solution is to treat it as a boolean instead?! I'm
James> not sure which is more ugly.
James> Why wouldn't explicit comparison against NULL be the
James> preferred fix?
"if (ptr)" and "if (!ptr)" are the preferred idiom for testing whether
a pointer is NULL. What is gained by writing "if (ptr != NULL)" ?
next prev parent reply other threads:[~2006-02-08 22:23 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-08 22:28 [PATCH] ppp: don't use 0 in pointer context Alexey Dobriyan
2006-02-08 22:14 ` James Carlson
2006-02-08 22:19 ` Herbert Xu
2006-02-08 22:45 ` David Stevens
2006-02-08 22:47 ` David S. Miller
2006-02-08 22:51 ` Paul Mackerras
2006-02-08 23:00 ` Rick Jones
2006-02-08 23:08 ` Herbert Xu
2006-02-08 23:22 ` Alexey Dobriyan
2006-02-08 23:26 ` Paul Mackerras
2006-02-08 23:49 ` Herbert Xu
2006-02-08 23:58 ` David S. Miller
2006-02-09 0:05 ` Randy.Dunlap
2006-02-09 0:06 ` Herbert Xu
2006-02-08 22:23 ` Roland Dreier [this message]
2006-02-08 22:44 ` Paul Mackerras
2006-02-09 13:15 ` James Carlson
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=ada8xslbibn.fsf@cisco.com \
--to=rdreier@cisco.com \
--cc=adobriyan@gmail.com \
--cc=carlsonj@workingcode.com \
--cc=linux-ppp@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--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).