From: Jim Meyering Date: Tue, 4 Nov 2003 10:27:24 +0000 (+0000) Subject: (fold_file): Use x2nrealloc rather than xrealloc. X-Git-Tag: v5.1.0~249 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6228ff86bd4ea7960bdae003cbe838a3e2d299a8;p=thirdparty%2Fcoreutils.git (fold_file): Use x2nrealloc rather than xrealloc. --- diff --git a/src/fold.c b/src/fold.c index 5be82db2c4..e8a2f81c46 100644 --- a/src/fold.c +++ b/src/fold.c @@ -145,10 +145,7 @@ fold_file (char *filename, int width) while ((c = getc (istream)) != EOF) { if (offset_out + 1 >= allocated_out) - { - allocated_out += 1024; - line_out = xrealloc (line_out, allocated_out); - } + line_out = x2nrealloc (line_out, &allocated_out, sizeof *line_out); if (c == '\n') {