mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-17 18:02:09 +03:00
(fold_file): Use x2nrealloc rather than xrealloc.
This commit is contained in:
1 parent
dfed7d19ac
commit
6228ff86bd
1 file changed
+1
-4
+1
-4
@@ -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')
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user