]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
[BZ #3195]
authorUlrich Drepper <drepper@redhat.com>
Sat, 13 Oct 2007 23:04:40 +0000 (23:04 +0000)
committerUlrich Drepper <drepper@redhat.com>
Sat, 13 Oct 2007 23:04:40 +0000 (23:04 +0000)
* nscd/nscd_getai.c (__nscd_getai): Set errno to 0 in case we found
no entry.
* nscd/nscd_getgr.c (nscd_getgr_r): Likewise.
* nscd/nscd_gethst_r.c (nscd_gethst_r): Likewise.
* nscd/nscd_getpw_r.c (nscd_getpw_r): Likewise.
* nscd/nscd_getserv_r.c (nscd_getserv_r): Likewise.

ChangeLog
nscd/nscd_getai.c
nscd/nscd_getgr_r.c
nscd/nscd_gethst_r.c
nscd/nscd_getpw_r.c
nscd/nscd_getserv_r.c
nscd/nscd_helper.c

index 13bf1dc9f66f002e911b74b217bdfbbdc710059c..ae900fed1598a59edfb7f1b3471b008c2037d893 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2007-10-13  Ulrich Drepper  <drepper@redhat.com>
 
+       [BZ #3195]
+       * nscd/nscd_getai.c (__nscd_getai): Set errno to 0 in case we found
+       no entry.
+       * nscd/nscd_getgr.c (nscd_getgr_r): Likewise.
+       * nscd/nscd_gethst_r.c (nscd_gethst_r): Likewise.
+       * nscd/nscd_getpw_r.c (nscd_getpw_r): Likewise.
+       * nscd/nscd_getserv_r.c (nscd_getserv_r): Likewise.
+
        * nscd/nscd_getgr_r.c (nscd_getgr_r): Optimize a bit: use simpler
        read mechanism when there are no group members and avoid no-op
        read syscall in this case.
index 5df32dc6dccd627aa553b450913ea337ce6fe3ca..56f963776e579533bbcbda433db0e2a1bfb174f7 100644 (file)
@@ -168,8 +168,8 @@ __nscd_getai (const char *key, struct nscd_ai_result **result, int *h_errnop)
       /* Store the error number.  */
       *h_errnop = ai_resp.error;
 
-      /* The `errno' to some value != ERANGE.  */
-      __set_errno (ENOENT);
+      /* Set errno to 0 to indicate no error, just no found record.  */
+      __set_errno (0);
       /* Even though we have not found anything, the result is zero.  */
       retval = 0;
     }
index 543ee177034093ec5d1d91279ed8ac5acc255f71..a277a1d355d70e95120e1907dac8457435b8260a 100644 (file)
@@ -302,8 +302,8 @@ nscd_getgr_r (const char *key, size_t keylen, request_type type,
     }
   else
     {
-      /* The `errno' to some value != ERANGE.  */
-      __set_errno (ENOENT);
+      /* Set errno to 0 to indicate no error, just no found record.  */
+      __set_errno (0);
       /* Even though we have not found anything, the result is zero.  */
       retval = 0;
     }
index 03b73a4a47f58b5b3d0d7c066d10a905526b2023..a2114047563880c9377ed062c624ffd97befa174 100644 (file)
@@ -379,8 +379,8 @@ nscd_gethst_r (const char *key, size_t keylen, request_type type,
       /* Store the error number.  */
       *h_errnop = hst_resp.error;
 
-      /* The `errno' to some value != ERANGE.  */
-      __set_errno (ENOENT);
+      /* Set errno to 0 to indicate no error, just no found record.  */
+      __set_errno (0);
       /* Even though we have not found anything, the result is zero.  */
       retval = 0;
     }
index b84baa1a666f6808819f63cbbddf8bc558e479dc..21f792bb4eb9878593d77fa8e557f8a8e9074e57 100644 (file)
@@ -211,8 +211,8 @@ nscd_getpw_r (const char *key, size_t keylen, request_type type,
     }
   else
     {
-      /* The `errno' to some value != ERANGE.  */
-      __set_errno (ENOENT);
+      /* Set errno to 0 to indicate no error, just no found record.  */
+      __set_errno (0);
       /* Even though we have not found anything, the result is zero.  */
       retval = 0;
     }
index a725b1d3deb65306260184024c2f7dae31dccd80..3cd5a2429893cf375104e2a1230304f3549cbc20 100644 (file)
@@ -301,8 +301,8 @@ nscd_getserv_r (const char *crit, size_t critlen, const char *proto,
     }
   else
     {
-      /* The `errno' to some value != ERANGE.  */
-      __set_errno (ENOENT);
+      /* Set errno to 0 to indicate no error, just no found record.  */
+      __set_errno (0);
       /* Even though we have not found anything, the result is zero.  */
       retval = 0;
     }
index b499f9cf997eb32f227e08f1a167a60de1582edd..866535200f496d5480974cadae8d8c25e72a9b7c 100644 (file)
@@ -39,7 +39,7 @@
 
 
 /* Extra time we wait if the socket is still receiving data.  This
-   value is in microseconds.  Note that the other side is nscd on the
+   value is in milliseconds.  Note that the other side is nscd on the
    local machine and it is already transmitting data.  So the wait
    time need not be long.  */
 #define EXTRA_RECEIVE_TIME 200