about summary refs log tree commit diff
path: root/nscd/grpcache.c
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@suse.de>2013-01-10 10:42:56 +0100
committerAndreas Schwab <schwab@suse.de>2013-01-10 10:44:04 +0100
commit33c0a3afc796df20b68b6b130609eb4d74f8e97b (patch)
tree06cd32580f1ef7ae71b1050de60ed7bbb5c4058f /nscd/grpcache.c
parent67881f5e929716cd68241d196cb22bdfc564cd32 (diff)
downloadglibc-33c0a3afc796df20b68b6b130609eb4d74f8e97b.tar.gz
glibc-33c0a3afc796df20b68b6b130609eb4d74f8e97b.tar.xz
glibc-33c0a3afc796df20b68b6b130609eb4d74f8e97b.zip
Revert "Properly check for short writes when sending the response in nscd"
This reverts commit dd31ac7a8e0d4cc24eee6815f9101caa5aa64291.
Diffstat (limited to 'nscd/grpcache.c')
-rw-r--r--nscd/grpcache.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/nscd/grpcache.c b/nscd/grpcache.c
index a26548c3d2..d25d8e92f2 100644
--- a/nscd/grpcache.c
+++ b/nscd/grpcache.c
@@ -75,7 +75,6 @@ cache_addgr (struct database_dyn *db, int fd, request_header *req,
 	     const void *key, struct group *grp, uid_t owner,
 	     struct hashentry *const he, struct datahead *dh, int errval)
 {
-  bool all_written = true;
   ssize_t total;
   ssize_t written;
   time_t t = time (NULL);
@@ -343,9 +342,6 @@ cache_addgr (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;
 	}
 
       /* Add the record to the database.  But only if it has not been
@@ -405,7 +401,7 @@ cache_addgr (struct database_dyn *db, int fd, request_header *req,
 	}
     }
 
-  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__,