diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2010-10-15 09:25:51 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2010-10-21 22:21:24 +0200 |
commit | 345d93eb7cb48056cf1d69180d8a2464c4d4b2be (patch) | |
tree | 0ab5abb953d41b91aad63976dbdd0c6eaf77b74e /common/hush.c | |
parent | f81edffe0ee1f1236fa3a67fcf63970490f7b5a5 (diff) | |
download | barebox-345d93eb7cb48056cf1d69180d8a2464c4d4b2be.tar.gz barebox-345d93eb7cb48056cf1d69180d8a2464c4d4b2be.tar.xz |
hush: sparse fixes
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common/hush.c')
-rw-r--r-- | common/hush.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/common/hush.c b/common/hush.c index 3359f37c60..77610bba7d 100644 --- a/common/hush.c +++ b/common/hush.c @@ -362,7 +362,7 @@ static int b_addqchr(o_string *o, int ch, int quote) } /* belongs in utility.c */ -char *simple_itoa(unsigned int i) +static char *simple_itoa(unsigned int i) { /* 21 digits plus null terminator, good for 64-bit or smaller ints */ static char local[22]; @@ -636,10 +636,10 @@ static int run_pipe_real(struct p_context *ctx, struct pipe *pi) } if (child->sp) { char * str = NULL; - struct p_context ctx; + struct p_context ctx1; str = make_string((child->argv + i)); - parse_string_outer(&ctx, str, FLAG_EXIT_FROM_LOOP | FLAG_REPARSING); - release_context(&ctx); + parse_string_outer(&ctx1, str, FLAG_EXIT_FROM_LOOP | FLAG_REPARSING); + release_context(&ctx1); free(str); return last_return_code; } @@ -948,7 +948,7 @@ static int set_local_var(const char *s, int flg_export) * NAME=VALUE format. So the first order of business is to * split 's' on the '=' into 'name' and 'value' */ value = strchr(name, '='); - if (value==0 && ++value==0) { + if (!value) { free(name); return -1; } |