projects
/
platform
/
upstream
/
coreutils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c34f3b9
)
(new_control_record): Use x2nrealloc rather than xrealloc.
author
Jim Meyering
<jim@meyering.net>
Sun, 4 Jan 2004 21:08:47 +0000
(21:08 +0000)
committer
Jim Meyering
<jim@meyering.net>
Sun, 4 Jan 2004 21:08:47 +0000
(21:08 +0000)
src/csplit.c
patch
|
blob
|
history
diff --git
a/src/csplit.c
b/src/csplit.c
index dca288408cdbb04d7f7724abbd0b63eb2a637021..fd5ce30e7aa21c7236ec01276bd903b484438c94 100644
(file)
--- 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;