diff options
author | Ahmad Fatoum <ahmad@a3f.at> | 2020-11-26 19:31:51 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2020-11-27 10:02:36 +0100 |
commit | d96c54acb8c0fd05446ce9bffd931510d2b229e1 (patch) | |
tree | 9ac3224ca070cba75c1c4bb3b6326dfa65370cd4 | |
parent | 582d32b7d1acec818e4c225fa0ecd528125d8193 (diff) | |
download | barebox-d96c54acb8c0fd05446ce9bffd931510d2b229e1.tar.gz barebox-d96c54acb8c0fd05446ce9bffd931510d2b229e1.tar.xz |
hush: remove non-functional code
name is unused except for printing and value is modified, but never read
back. They currently serve no purpose, so drop them. The actual
splitting by '=' happens in set_local_var later.
Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r-- | common/hush.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/common/hush.c b/common/hush.c index ec0d5129b7..a6fc4485bf 100644 --- a/common/hush.c +++ b/common/hush.c @@ -798,16 +798,9 @@ static int run_pipe_real(struct p_context *ctx, struct pipe *pi) * This junk is all to decide whether or not to export this * variable. */ int export_me = 0; - char *name, *value; - name = xstrdup(child->argv[i]); - hush_debug("Local environment set: %s\n", name); - value = strchr(name, '='); + hush_debug("Local environment set: %s\n", child->argv[i]); - if (value) - *value = 0; - - free(name); p = insert_var_value(child->argv[i]); rcode = set_local_var(p, export_me); if (rcode) |