From: Jim Meyering Date: Tue, 4 Nov 2003 09:27:54 +0000 (+0000) Subject: (show_date): Use x2nrealloc rather than xrealloc. X-Git-Tag: v5.1.0~253 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e1c6989ecf7d49f524286f587b447b7b632de5c8;p=thirdparty%2Fcoreutils.git (show_date): Use x2nrealloc rather than xrealloc. --- diff --git a/src/date.c b/src/date.c index 6d93338330..aa4b6a6134 100644 --- a/src/date.c +++ b/src/date.c @@ -528,8 +528,7 @@ show_date (const char *format, struct timespec when) while (1) { int done; - out_length += 200; - out = xrealloc (out, out_length); + out = x2nrealloc (out, &out_length, sizeof *out); /* Mark the first byte of the buffer so we can detect the case of nstrftime producing an empty string. Otherwise, this loop