[Top][All Lists]
[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
- Test for getaddrinfo() broken on Tru64 UNIX 5.1, Albert Chin, 2007/10/10
- Re: Test for getaddrinfo() broken on Tru64 UNIX 5.1, Bruno Haible, 2007/10/13
- Re: Test for getaddrinfo() broken on Tru64 UNIX 5.1, Benoit SIGOURE, 2007/10/13
- Re: Test for getaddrinfo() broken on Tru64 UNIX 5.1, Ben Pfaff, 2007/10/13
- Re: 0 vs. NULL (was: Re: Test for getaddrinfo() broken on Tru64 UNIX 5.1), Bruno Haible, 2007/10/13
- Re: 0 vs. NULL, Micah Cowan, 2007/10/13
- Re: 0 vs. NULL, Bruno Haible, 2007/10/13
- Re: 0 vs. NULL, Paul Eggert, 2007/10/15
- Re: 0 vs. NULL, Micah Cowan, 2007/10/15
- Re: Test for getaddrinfo() broken on Tru64 UNIX 5.1, Jim Meyering, 2007/10/13
Re: Test for getaddrinfo() broken on Tru64 UNIX 5.1, Simon Josefsson, 2007/10/13