summaryrefslogtreecommitdiff
path: root/src/pr.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2003-11-04 09:32:16 +0000
committerJim Meyering <jim@meyering.net>2003-11-04 09:32:16 +0000
commitdfed7d19acb28512dd702b82a69055428fdf0867 (patch)
treefa25feefd7b0a67b5512ec1ef9de1e572c4af341 /src/pr.c
parentbf4248b344135e5b92ef73af2d9a5f9acb012879 (diff)
downloadcoreutils-dfed7d19acb28512dd702b82a69055428fdf0867.tar.xz
(store_char): Use x2nrealloc rather than xrealloc.
Diffstat (limited to 'src/pr.c')
-rw-r--r--src/pr.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/pr.c b/src/pr.c
index f8184883b..8ae0011af 100644
--- 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;
}