Avoid warning when reload of group entry fails
authorUlrich Drepper <drepper@gmail.com>
Thu, 6 Oct 2011 07:44:19 +0000 (03:44 -0400)
committerUlrich Drepper <drepper@gmail.com>
Thu, 6 Oct 2011 07:44:19 +0000 (03:44 -0400)
ChangeLog
nscd/grpcache.c

index 710d6db..6ad0e1a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2011-10-06  Ulrich Drepper  <drepper@gmail.com>
 
+       * nscd/grpcache.c (cache_addgr): Initialize written in all cases.
+
        * nss/nsswitch.c (__nss_lookup_function): Fix order of deleting
        from tree and freeing node.
 
index 8a2f80c..e9607c6 100644 (file)
@@ -117,6 +117,8 @@ cache_addgr (struct database_dyn *db, int fd, request_header *req,
          if (fd != -1)
            written = TEMP_FAILURE_RETRY (send (fd, &notfound, total,
                                                MSG_NOSIGNAL));
+         else
+           written = total;
 
          /* If we cannot permanently store the result, so be it.  */
          if (db->negtimeout == 0)