From: Marco Roeland <marco.roeland@xs4all.nl>
To: Morten Welinder <mwelinder@gmail.com>
Cc: Mike McCormack <mike@codeweavers.com>, git@vger.kernel.org
Subject: Re: [PATCH] imap-send: cleanup execl() call to use NULL sentinel instead of 0
Date: Sat, 11 Mar 2006 21:30:22 +0100 [thread overview]
Message-ID: <20060311203022.GA1578@fiberbit.xs4all.nl> (raw)
In-Reply-To: <118833cc0603110601x6ac9b2b6kaa0277981c6dd44b@mail.gmail.com>
On Saturday March 11th 2006 Morten Welinder wrote:
> If you're going to fix that, you should use (char *)NULL or
> (char *)0, just in case you end up on a machine where
> NULL doesn't a pointer type.
>
> (Yup, NULL can be a null pointer without having pointer type.)
For gcc NULL is specifically always guaranteed to be a valid sentinel.
And it was basically just about fixing the gcc warning, no pedantics
intended! All other uses within git for the exec() family also use plain
uncast NULL, which looks better anyway.
Strictly speaking you're probably right, but there's a chance that this
will generate warnings on other compilers.
And if you should use a compiler with a weird notion of NULL, you're
probably better off switching compilers immediately. ;-)
--
Marco Roeland
prev parent reply other threads:[~2006-03-11 20:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-11 8:55 [PATCH] imap-send: cleanup execl() call to use NULL sentinel instead of 0 Marco Roeland
2006-03-11 14:01 ` Morten Welinder
2006-03-11 20:30 ` Marco Roeland [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=20060311203022.GA1578@fiberbit.xs4all.nl \
--to=marco.roeland@xs4all.nl \
--cc=git@vger.kernel.org \
--cc=mike@codeweavers.com \
--cc=mwelinder@gmail.com \
/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).