diff options
Diffstat (limited to 'nscd/grpcache.c')
-rw-r--r-- | nscd/grpcache.c | 4 |
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__, |