This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.
Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
Thorsten Kukuk wrote:
> * nss/getXXbyYY_r.c: If key is not found, return zero, not
> a random errno value.
>
> --- nss/getXXbyYY_r.c 10 Mar 2004 09:28:25 -0000 1.57
> +++ nss/getXXbyYY_r.c 27 Mar 2004 08:44:52 -0000
> @@ -256,6 +256,11 @@
> else if (status == NSS_STATUS_TRYAGAIN && *h_errnop != NETDB_INTERNAL)
> res = EAGAIN;
> #endif
> + else if (status == NSS_STATUS_NOTFOUND)
> + {
> + __set_errno (ENOENT);
> + return 0;
> + }
That's not really necessary, errno need not be set. But since we always
do it for some compatibility reason it is OK. But your patch is not
optimal, take a look at the change I've checked in.
--
â Ulrich Drepper â Red Hat, Inc. â 444 Castro St â Mountain View, CA â
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |