diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2016-01-11 13:15:00 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2016-01-11 13:15:04 +0100 |
commit | e07d90b760047b8461cd840f19e6291456edfa53 (patch) | |
tree | 23aa2c2165b6715459c92cb0d7f39acb8926bd16 /common | |
parent | 96b115be942ed8dcc94a5230fce0eafb4ac93f2d (diff) | |
download | barebox-e07d90b760047b8461cd840f19e6291456edfa53.tar.gz barebox-e07d90b760047b8461cd840f19e6291456edfa53.tar.xz |
hush: Initialize struct p_context
The hush context must be initialized before it is used. Add
initialization where necessary.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common')
-rw-r--r-- | common/hush.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/common/hush.c b/common/hush.c index 084dd858dc..832bc7bdb2 100644 --- a/common/hush.c +++ b/common/hush.c @@ -1865,7 +1865,7 @@ static char * make_string(char ** inp) int run_command(const char *cmd) { - struct p_context ctx; + struct p_context ctx = {}; int ret; initialize_context(&ctx); @@ -1889,7 +1889,7 @@ static int execute_script(const char *path, int argc, char *argv[]) static int source_script(const char *path, int argc, char *argv[]) { - struct p_context ctx; + struct p_context ctx = {}; char *script; int ret; @@ -1918,7 +1918,7 @@ int run_shell(void) { int rcode; struct in_str input; - struct p_context ctx; + struct p_context ctx = {}; int exit = 0; login(); |