bug-gnulib
[Top][All Lists]
Advanced

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

Re: Test for getaddrinfo() broken on Tru64 UNIX 5.1


From: Simon Josefsson
Subject: Re: Test for getaddrinfo() broken on Tru64 UNIX 5.1
Date: Sat, 13 Oct 2007 21:34:36 +0200
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.1 (gnu/linux)

Bruno Haible <address@hidden> writes:

> Benoit SIGOURE wrote:
>> >   4) Don't use 0 to designate null pointers. That doesn't sit well with
>> >      C++ compilers.
>> 
>> s/C++/C/ right?
>
> Actually, neither C nor C++ compilers cry when you use 0 for NULL. It's only
> my personal preference.

On platforms where integers aren't the same size as pointers, things can
go wrong if 1) you pass 0 to a function that expects a pointer and no
function prototype was available during compilation, or 2) you pass it
to a function that takes a variable parameter list.  So it is a good
habit to use NULL for pointers.

/Simon




reply via email to

[Prev in Thread] Current Thread [Next in Thread]