]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(store_char): Use x2nrealloc rather than xrealloc.
authorJim Meyering <jim@meyering.net>
Tue, 4 Nov 2003 09:32:16 +0000 (09:32 +0000)
committerJim Meyering <jim@meyering.net>
Tue, 4 Nov 2003 09:32:16 +0000 (09:32 +0000)
src/pr.c

index f8184883b6be7e88e43da0b83a18dd523aacd198..8ae0011af4fa2cca5db2dd5f56f1f8954e9a05e9 100644 (file)
--- a/src/pr.c
+++ b/src/pr.c
@@ -2013,8 +2013,7 @@ store_char (int c)
   if (buff_current >= buff_allocated)
     {
       /* May be too generous. */
-      buff_allocated = 2 * buff_allocated;
-      buff = xrealloc (buff, buff_allocated * sizeof (char));
+      buff = x2nrealloc (buff, &buff_allocated, sizeof *buff);
     }
   buff[buff_current++] = (char) c;
 }