about summary refs log tree commit diff
path: root/nscd/initgrcache.c
diff options
context:
space:
mode:
Diffstat (limited to 'nscd/initgrcache.c')
-rw-r--r--nscd/initgrcache.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/nscd/initgrcache.c b/nscd/initgrcache.c
index 94b279d559..196407c870 100644
--- a/nscd/initgrcache.c
+++ b/nscd/initgrcache.c
@@ -171,12 +171,10 @@ addinitgroupsX (struct database_dyn *db, int fd, request_header *req,
 	nip = nip->next;
     }
 
-  bool all_written;
   ssize_t total;
   ssize_t written;
   time_t timeout;
  out:
-  all_written = true;
   timeout = MAX_TIMEOUT_VALUE;
   if (!any_success)
     {
@@ -381,9 +379,6 @@ addinitgroupsX (struct database_dyn *db, int fd, request_header *req,
 # endif
 #endif
 	    written = writeall (fd, &dataset->resp, dataset->head.recsize);
-
-	  if (written != dataset->head.recsize)
-	    all_written = false;
 	}
 
 
@@ -410,7 +405,7 @@ addinitgroupsX (struct database_dyn *db, int fd, request_header *req,
 
   free (groups);
 
-  if (__builtin_expect (!all_written, 0) && debug_level > 0)
+  if (__builtin_expect (written != total, 0) && debug_level > 0)
     {
       char buf[256];
       dbg_log (_("short write in %s: %s"), __FUNCTION__,