summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorSascha Hauer <sha@octopus.labnet.pengutronix.de>2007-09-26 13:57:18 +0200
committerSascha Hauer <sha@octopus.labnet.pengutronix.de>2007-09-26 13:57:18 +0200
commit5efc6836b7318b2bb442b1584d9371d2ea2df6d9 (patch)
tree114d291e31127c7f0ba3309b9402d1ce610369d9 /common
parentfb441a11a076678c3882950cee3515cef3c17203 (diff)
downloadbarebox-5efc6836b7318b2bb442b1584d9371d2ea2df6d9.tar.gz
barebox-5efc6836b7318b2bb442b1584d9371d2ea2df6d9.tar.xz
hush.c: use xrealloc instead of realloc to save some bytes
Diffstat (limited to 'common')
-rw-r--r--common/hush.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/common/hush.c b/common/hush.c
index ccc8698bc6..8552ecea26 100644
--- a/common/hush.c
+++ b/common/hush.c
@@ -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++) {