(new_control_record): Use x2nrealloc rather than xrealloc.
authorJim Meyering <jim@meyering.net>
Sun, 4 Jan 2004 21:08:47 +0000 (21:08 +0000)
committerJim Meyering <jim@meyering.net>
Sun, 4 Jan 2004 21:08:47 +0000 (21:08 +0000)
src/csplit.c

index dca288408cdbb04d7f7724abbd0b63eb2a637021..fd5ce30e7aa21c7236ec01276bd903b484438c94 100644 (file)
@@ -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;