9
0
Fork 0

hush.c: use xrealloc instead of realloc to save some bytes

This commit is contained in:
Sascha Hauer 2007-09-26 13:57:18 +02:00
parent fb441a11a0
commit 5efc6836b7
1 changed files with 1 additions and 2 deletions

View File

@ -952,8 +952,7 @@ static int done_word(o_string *dest, struct p_context *ctx)
child->argc=0;
}
argc = ++child->argc;
child->argv = realloc(child->argv, (argc+1)*sizeof(*child->argv));
if (child->argv == NULL) return 1;
child->argv = xrealloc(child->argv, (argc+1)*sizeof(*child->argv));
child->argv[argc-1]=str;
child->argv[argc]=NULL;
for (s = dest->data; s && *s; s++,str++) {