From: Ahmad Fatoum <ahmad@a3f.at>
To: barebox@lists.infradead.org
Subject: [PATCH 1/4] hush: remove non-functional code
Date: Thu, 26 Nov 2020 19:31:51 +0100 [thread overview]
Message-ID: <20201126183154.348024-1-ahmad@a3f.at> (raw)
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>
---
common/hush.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/common/hush.c b/common/hush.c
index ec0d5129b70d..a6fc4485bf52 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)
--
2.28.0
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next reply other threads:[~2020-11-26 18:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-26 18:31 Ahmad Fatoum [this message]
2020-11-26 18:31 ` [PATCH 2/4] commands: nv: fix set/remove of multiple variables in one go Ahmad Fatoum
2020-11-26 18:31 ` [PATCH 3/4] commands: nv: pass empty string for nv Ahmad Fatoum
2020-11-26 18:31 ` [PATCH 4/4] commands: implement and use parse_assignment helper Ahmad Fatoum
2020-11-27 9:02 ` [PATCH 1/4] hush: remove non-functional code Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201126183154.348024-1-ahmad@a3f.at \
--to=ahmad@a3f.at \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox