diff options
author | Jakub Jelinek <jakub@redhat.com> | 2005-03-03 13:34:35 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2005-03-03 13:34:35 +0000 |
commit | d0fec8d06cc2234c8114b51f630466eff9d5f841 (patch) | |
tree | 223a7fdae69137bd5670e59249442bc6a2db1ad1 /nscd/pwdcache.c | |
parent | 00e4559b612f179492ff3721f86c92498894432f (diff) | |
download | glibc-d0fec8d06cc2234c8114b51f630466eff9d5f841.tar.gz glibc-d0fec8d06cc2234c8114b51f630466eff9d5f841.tar.xz glibc-d0fec8d06cc2234c8114b51f630466eff9d5f841.zip |
Updated to fedora-glibc-20050302T1820
Diffstat (limited to 'nscd/pwdcache.c')
-rw-r--r-- | nscd/pwdcache.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/nscd/pwdcache.c b/nscd/pwdcache.c index e8b9578778..34265c3f39 100644 --- a/nscd/pwdcache.c +++ b/nscd/pwdcache.c @@ -1,5 +1,5 @@ /* Cache handling for passwd lookup. - Copyright (C) 1998-2002, 2003, 2004 Free Software Foundation, Inc. + Copyright (C) 1998-2002, 2003, 2004, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998. @@ -287,7 +287,7 @@ cache_addpw (struct database_dyn *db, int fd, request_header *req, unnecessarily let the receiver wait. */ assert (fd != -1); - written = TEMP_FAILURE_RETRY (write (fd, &dataset->resp, total)); + written = writeall (fd, &dataset->resp, total); } @@ -425,11 +425,10 @@ addpwbyX (struct database_dyn *db, int fd, request_header *req, { char *old_buffer = buffer; errno = 0; -#define INCR 1024 if (__builtin_expect (buflen > 32768, 0)) { - buflen += INCR; + buflen *= 2; buffer = (char *) realloc (use_malloc ? buffer : NULL, buflen); if (buffer == NULL) { @@ -450,7 +449,7 @@ addpwbyX (struct database_dyn *db, int fd, request_header *req, else /* Allocate a new buffer on the stack. If possible combine it with the previously allocated buffer. */ - buffer = (char *) extend_alloca (buffer, buflen, buflen + INCR); + buffer = (char *) extend_alloca (buffer, buflen, 2 * buflen); } #if 0 |