about summary refs log tree commit diff
path: root/nscd
diff options
context:
space:
mode:
Diffstat (limited to 'nscd')
-rw-r--r--nscd/nscd_getgr_r.c5
-rw-r--r--nscd/nscd_getpw_r.c5
2 files changed, 6 insertions, 4 deletions
diff --git a/nscd/nscd_getgr_r.c b/nscd/nscd_getgr_r.c
index 596e31fcde..8129d81d66 100644
--- a/nscd/nscd_getgr_r.c
+++ b/nscd/nscd_getgr_r.c
@@ -48,7 +48,7 @@ __nscd_getgrgid_r (gid_t gid, struct group *resultbuf, char *buffer,
 		   size_t buflen)
 {
   char *p = buffer;
-  char plen;
+  int plen;
 
   plen = snprintf (buffer, buflen, "%d", gid);
   if (plen == -1)
@@ -98,7 +98,8 @@ __nscd_getgr_r (const char *key, request_type type, struct group *resultbuf,
   ssize_t nbytes;
 
   if (sock == -1)
-    return 1;
+    /* Returning two signals that contacting the daemon failed.  */
+    return 2;
 
   req.version = NSCD_VERSION;
   req.type = type;
diff --git a/nscd/nscd_getpw_r.c b/nscd/nscd_getpw_r.c
index 4fc78e1f89..4420b80399 100644
--- a/nscd/nscd_getpw_r.c
+++ b/nscd/nscd_getpw_r.c
@@ -48,7 +48,7 @@ __nscd_getpwuid_r (uid_t uid, struct passwd *resultbuf, char *buffer,
 		   size_t buflen)
 {
   char *p = buffer;
-  char plen;
+  int plen;
 
   plen = snprintf (buffer, buflen, "%d", uid);
   if (plen == -1)
@@ -98,7 +98,8 @@ __nscd_getpw_r (const char *key, request_type type, struct passwd *resultbuf,
   ssize_t nbytes;
 
   if (sock == -1)
-    return 1;
+    /* Returning two signals that contacting the daemon failed.  */
+    return 2;
 
   req.version = NSCD_VERSION;
   req.type = type;