aboutsummaryrefslogtreecommitdiff
path: root/nscd/grpcache.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-07-17 02:38:34 +0000
committerUlrich Drepper <drepper@redhat.com>2001-07-17 02:38:34 +0000
commit23700036397721389b90ac41571d68df2f26ad67 (patch)
treefd1fef01ef5380a5464e370871d202ce2e90e4b3 /nscd/grpcache.c
parent98e75a1c9c50e99e46c94623d9a9a8088c4efe30 (diff)
downloadglibc-23700036397721389b90ac41571d68df2f26ad67.tar
glibc-23700036397721389b90ac41571d68df2f26ad67.tar.gz
glibc-23700036397721389b90ac41571d68df2f26ad67.tar.bz2
glibc-23700036397721389b90ac41571d68df2f26ad67.zip
Update.
only if debug_level > 0. Add little performance improvements. Use TEMP_FAILURE_RETRY around write calls.
Diffstat (limited to 'nscd/grpcache.c')
-rw-r--r--nscd/grpcache.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/nscd/grpcache.c b/nscd/grpcache.c
index 5e037b5b1f..93a7a0d86d 100644
--- a/nscd/grpcache.c
+++ b/nscd/grpcache.c
@@ -170,7 +170,7 @@ cache_addgr (struct database *db, int fd, request_header *req, void *key,
memcpy (cp, buf, n);
/* Write the result. */
- written = write (fd, &data->resp, total);
+ written = TEMP_FAILURE_RETRY (write (fd, &data->resp, total));
/* Compute the timeout time. */
t += db->postimeout;
@@ -187,7 +187,7 @@ cache_addgr (struct database *db, int fd, request_header *req, void *key,
pthread_rwlock_unlock (&db->lock);
}
- if (written != total && debug_level > 0)
+ if (__builtin_expect (written != total, 0) && debug_level > 0)
{
char buf[256];
dbg_log (_("short write in %s: %s"), __FUNCTION__,