From: Jim Meyering Date: Tue, 4 Nov 2003 09:32:16 +0000 (+0000) Subject: (store_char): Use x2nrealloc rather than xrealloc. X-Git-Tag: v5.1.0~250 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dfed7d19acb28512dd702b82a69055428fdf0867;p=thirdparty%2Fcoreutils.git (store_char): Use x2nrealloc rather than xrealloc. --- diff --git a/src/pr.c b/src/pr.c index f8184883b6..8ae0011af4 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; }