aboutsummaryrefslogtreecommitdiff
path: root/nscd/initgrcache.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/initgrcache.c
parent67881f5e929716cd68241d196cb22bdfc564cd32 (diff)
downloadglibc-33c0a3afc796df20b68b6b130609eb4d74f8e97b.zip
glibc-33c0a3afc796df20b68b6b130609eb4d74f8e97b.tar.gz
glibc-33c0a3afc796df20b68b6b130609eb4d74f8e97b.tar.bz2
Revert "Properly check for short writes when sending the response in nscd"
This reverts commit dd31ac7a8e0d4cc24eee6815f9101caa5aa64291.
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 94b279d..196407c 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__,