summary refs log tree commit diff
path: root/nscd
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2007-10-13 23:04:40 +0000
committerUlrich Drepper <drepper@redhat.com>2007-10-13 23:04:40 +0000
commitcfca0aa39759db23eafd06fda9d989bd36f35a88 (patch)
treeb5f0aa6148e16b67046383d3ffce7086e44afcc8 /nscd
parent43d3e6bd9210fc5900734206ed9478067b3f8003 (diff)
downloadglibc-cfca0aa39759db23eafd06fda9d989bd36f35a88.tar.gz
glibc-cfca0aa39759db23eafd06fda9d989bd36f35a88.tar.xz
glibc-cfca0aa39759db23eafd06fda9d989bd36f35a88.zip
[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.
Diffstat (limited to 'nscd')
-rw-r--r--nscd/nscd_getai.c4
-rw-r--r--nscd/nscd_getgr_r.c4
-rw-r--r--nscd/nscd_gethst_r.c4
-rw-r--r--nscd/nscd_getpw_r.c4
-rw-r--r--nscd/nscd_getserv_r.c4
-rw-r--r--nscd/nscd_helper.c2
6 files changed, 11 insertions, 11 deletions
diff --git a/nscd/nscd_getai.c b/nscd/nscd_getai.c
index 5df32dc6dc..56f963776e 100644
--- a/nscd/nscd_getai.c
+++ b/nscd/nscd_getai.c
@@ -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;
     }
diff --git a/nscd/nscd_getgr_r.c b/nscd/nscd_getgr_r.c
index 543ee17703..a277a1d355 100644
--- a/nscd/nscd_getgr_r.c
+++ b/nscd/nscd_getgr_r.c
@@ -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;
     }
diff --git a/nscd/nscd_gethst_r.c b/nscd/nscd_gethst_r.c
index 03b73a4a47..a211404756 100644
--- a/nscd/nscd_gethst_r.c
+++ b/nscd/nscd_gethst_r.c
@@ -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;
     }
diff --git a/nscd/nscd_getpw_r.c b/nscd/nscd_getpw_r.c
index b84baa1a66..21f792bb4e 100644
--- a/nscd/nscd_getpw_r.c
+++ b/nscd/nscd_getpw_r.c
@@ -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;
     }
diff --git a/nscd/nscd_getserv_r.c b/nscd/nscd_getserv_r.c
index a725b1d3de..3cd5a24298 100644
--- a/nscd/nscd_getserv_r.c
+++ b/nscd/nscd_getserv_r.c
@@ -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;
     }
diff --git a/nscd/nscd_helper.c b/nscd/nscd_helper.c
index b499f9cf99..866535200f 100644
--- a/nscd/nscd_helper.c
+++ b/nscd/nscd_helper.c
@@ -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