summaryrefslogtreecommitdiff
path: root/src/fold.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2003-11-04 10:27:24 +0000
committerJim Meyering <jim@meyering.net>2003-11-04 10:27:24 +0000
commit6228ff86bd4ea7960bdae003cbe838a3e2d299a8 (patch)
tree9e0be300437590f35aa7f7d3da1bacd69aadf3c0 /src/fold.c
parentdfed7d19acb28512dd702b82a69055428fdf0867 (diff)
downloadcoreutils-6228ff86bd4ea7960bdae003cbe838a3e2d299a8.tar.xz
(fold_file): Use x2nrealloc rather than xrealloc.
Diffstat (limited to 'src/fold.c')
-rw-r--r--src/fold.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/fold.c b/src/fold.c
index 5be82db2c..e8a2f81c4 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')
{