diff options
author | Sascha Hauer <sha@octopus.labnet.pengutronix.de> | 2007-09-26 13:57:18 +0200 |
---|---|---|
committer | Sascha Hauer <sha@octopus.labnet.pengutronix.de> | 2007-09-26 13:57:18 +0200 |
commit | 5efc6836b7318b2bb442b1584d9371d2ea2df6d9 (patch) | |
tree | 114d291e31127c7f0ba3309b9402d1ce610369d9 /common | |
parent | fb441a11a076678c3882950cee3515cef3c17203 (diff) | |
download | barebox-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.c | 3 |
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++) { |