This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] getaddrinfo: Treat empty string as NULL
- From: Ulrich Drepper <drepper at redhat dot com>
- To: Simon Perreault <simon dot perreault at viagenie dot ca>
- Cc: libc-alpha at sourceware dot org
- Date: Fri, 21 Sep 2007 10:32:46 -0700
- Subject: Re: [PATCH] getaddrinfo: Treat empty string as NULL
- References: <200709060843.31733.simon.perreault@viagenie.ca>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Simon Perreault wrote:
> Shouldn't the empty string be treated as NULL, as is "*"?
> (For the name and service parameters.)
No, I don't think this is correct. The "*" handling shouldn't even be
there. The only reason is historic practice and compatibility. "" is
just an invalid valid and people should correct their code.
- --
â Ulrich Drepper â Red Hat, Inc. â 444 Castro St â Mountain View, CA â
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
iD8DBQFG9AA+2ijCOnn/RHQRAr0JAKC5yvRH131UMPMoo8wy0Pj8ujy6VQCgnrww
+0o47OuNwKuCdDyc/75G2VM=
=sJk5
-----END PGP SIGNATURE-----