projects
/
platform
/
upstream
/
coreutils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dfed7d1
)
(fold_file): Use x2nrealloc rather than xrealloc.
author
Jim Meyering
<jim@meyering.net>
Tue, 4 Nov 2003 10:27:24 +0000
(10:27 +0000)
committer
Jim Meyering
<jim@meyering.net>
Tue, 4 Nov 2003 10:27:24 +0000
(10:27 +0000)
src/fold.c
patch
|
blob
|
history
diff --git
a/src/fold.c
b/src/fold.c
index
5be82db
..
e8a2f81
100644
(file)
--- 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')
{