From 23700036397721389b90ac41571d68df2f26ad67 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 17 Jul 2001 02:38:34 +0000 Subject: Update. only if debug_level > 0. Add little performance improvements. Use TEMP_FAILURE_RETRY around write calls. --- nscd/pwdcache.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'nscd/pwdcache.c') diff --git a/nscd/pwdcache.c b/nscd/pwdcache.c index 88990ad..94d8bd2 100644 --- a/nscd/pwdcache.c +++ b/nscd/pwdcache.c @@ -166,7 +166,7 @@ cache_addpw (struct database *db, int fd, request_header *req, void *key, /* We write the dataset before inserting it to the database since while inserting this thread might block and so would unnecessarily let the receiver wait. */ - written = write (fd, &data->resp, total); + written = TEMP_FAILURE_RETRY (write (fd, &data->resp, total)); /* Compute the timeout time. */ t += db->postimeout; @@ -183,7 +183,7 @@ cache_addpw (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__, -- cgit v1.1