summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2004-01-04 21:08:47 +0000
committerJim Meyering <jim@meyering.net>2004-01-04 21:08:47 +0000
commit986b0ecbdfdbdd76cd39a92e7b4dd837654b3fc7 (patch)
treeedfaf8eac8de7a27204dba118a69ed084e17ad8c /src
parentc34f3b99593897e0f0ba1abba191fd6e5078104e (diff)
downloadcoreutils-986b0ecbdfdbdd76cd39a92e7b4dd837654b3fc7.tar.xz
(new_control_record): Use x2nrealloc rather than xrealloc.
Diffstat (limited to 'src')
-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;