aboutsummaryrefslogtreecommitdiff
path: root/coreutils/sort.c
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils/sort.c')
-rw-r--r--coreutils/sort.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/coreutils/sort.c b/coreutils/sort.c
index 1fa552725..ac8fc9b2e 100644
--- a/coreutils/sort.c
+++ b/coreutils/sort.c
@@ -360,8 +360,7 @@ int sort_main(int argc UNUSED_PARAM, char **argv)
for (;;) {
line = GET_LINE(fp);
if (!line) break;
- if (!(linecount & 63))
- lines = xrealloc(lines, sizeof(char *) * (linecount + 64));
+ lines = xrealloc_vector(lines, 6, linecount);
lines[linecount++] = line;
}
fclose_if_not_stdin(fp);