Re: [PATCH] imap-send: cleanup execl() call to use NULL sentinel instead of 0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
-
: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]