summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/csplit.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/csplit.c b/src/csplit.c
index dca288408..fd5ce30e7 100644
--- a/src/csplit.c
+++ b/src/csplit.c
@@ -985,10 +985,7 @@ new_control_record (void)
struct control *p;
if (control_used == control_allocated)
- {
- control_allocated += ALLOC_SIZE;
- controls = xrealloc (controls, control_allocated * sizeof *controls);
- }
+ controls = x2nrealloc (controls, &control_allocated, sizeof *controls);
p = &controls[control_used++];
p->regexpr = NULL;
p->repeat = 0;