[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: |
Ben Pfaff |
Subject: |
Re: Test for getaddrinfo() broken on Tru64 UNIX 5.1 |
Date: |
Sat, 13 Oct 2007 13:18:06 -0700 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) |
Simon Josefsson <address@hidden> writes:
> 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.
ISO C says that NULL can be defined as 0, without a cast to void
*, and it is always defined that way in C++. So it is best to
write null pointers in the circumstances you mention as 0 or NULL
cast to the proper pointer type.
--
Ben Pfaff
http://benpfaff.org
- 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 <=
- 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
Re: Test for getaddrinfo() broken on Tru64 UNIX 5.1, Albert Chin, 2007/10/14