diff options
author | Yaniv Kaul <ykaul@redhat.com> | 2018-08-02 16:02:33 +0300 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2018-08-14 05:15:04 +0000 |
commit | b2b6ab8eff317f6a507ab23897ea6cd5c718d99a (patch) | |
tree | 45fb1392f535f0236f057d9d9c932feda4f9ab40 /cli/src/cli-cmd-system.c | |
parent | 32c8f70f49c0e287c53998e37867f00fa775377b (diff) |
All: remove memset() before sprintf()
It's not needed.
There's a good chance the compiler is smart enough to remove it
anyway, but it can't hurt - I hope.
Compile-tested only!
Change-Id: Id7c054e146ba630227affa591007803f3046416b
updates: bz#1193929
Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
Diffstat (limited to 'cli/src/cli-cmd-system.c')
-rw-r--r-- | cli/src/cli-cmd-system.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/cli/src/cli-cmd-system.c b/cli/src/cli-cmd-system.c index 3b1d967b650..c41594bfa59 100644 --- a/cli/src/cli-cmd-system.c +++ b/cli/src/cli-cmd-system.c @@ -469,7 +469,6 @@ cli_cmd_sys_exec_cbk (struct cli_state *state, struct cli_cmd_word *word, tmp = strtok_r (NULL, " ", &saveptr); if (tmp) { in_cmd_args_count++; - memset (cmd_arg_name, '\0', sizeof(cmd_arg_name)); snprintf (cmd_arg_name, sizeof(cmd_arg_name), "cmd_arg_%d", in_cmd_args_count); ret = dict_set_str (dict, cmd_arg_name, tmp); @@ -491,7 +490,6 @@ cli_cmd_sys_exec_cbk (struct cli_state *state, struct cli_cmd_word *word, for (i=1; i <= cmd_args_count; i++) { in_cmd_args_count++; - memset (cmd_arg_name, '\0', sizeof(cmd_arg_name)); snprintf (cmd_arg_name, sizeof(cmd_arg_name), "cmd_arg_%d", in_cmd_args_count); ret = dict_set_str (dict, cmd_arg_name, |