From b9d3e8c8a8cd5faf23e30336303f6aeef5c32804 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Thu, 30 Jun 2016 10:45:52 +0200 Subject: [PATCH] cleanup: drop unused assignments In all code paths we set a value for these variables, so drop their initial unused assign. --- daemons/lvmetad/lvmetad-core.c | 2 +- daemons/lvmpolld/lvmpolld-cmd-utils.c | 2 +- lib/cache/lvmetad.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/daemons/lvmetad/lvmetad-core.c b/daemons/lvmetad/lvmetad-core.c index 1ec9e3bf2..31d093358 100644 --- a/daemons/lvmetad/lvmetad-core.c +++ b/daemons/lvmetad/lvmetad-core.c @@ -2646,7 +2646,7 @@ static response dump(lvmetad_state *s) static response handler(daemon_state s, client_handle h, request r) { - response res = { 0 }; + response res; lvmetad_state *state = s.private; char prev_token[128] = { 0 }; const char *rq; diff --git a/daemons/lvmpolld/lvmpolld-cmd-utils.c b/daemons/lvmpolld/lvmpolld-cmd-utils.c index 86f500033..f70fd0d20 100644 --- a/daemons/lvmpolld/lvmpolld-cmd-utils.c +++ b/daemons/lvmpolld/lvmpolld-cmd-utils.c @@ -31,7 +31,7 @@ const char *polling_op(enum poll_type type) static int add_to_cmd_arr(const char ***cmdargv, const char *str, unsigned *ind) { - const char **newargv = *cmdargv; + const char **newargv; if (*ind && !(*ind % MIN_ARGV_SIZE)) { newargv = dm_realloc(*cmdargv, (*ind / MIN_ARGV_SIZE + 1) * MIN_ARGV_SIZE * sizeof(char *)); diff --git a/lib/cache/lvmetad.c b/lib/cache/lvmetad.c index 94059dddf..476448d10 100644 --- a/lib/cache/lvmetad.c +++ b/lib/cache/lvmetad.c @@ -955,7 +955,7 @@ struct volume_group *lvmetad_vg_lookup(struct cmd_context *cmd, const char *vgna { struct volume_group *vg = NULL; struct volume_group *vg2 = NULL; - daemon_reply reply = { 0 }; + daemon_reply reply; int found; char uuid[64]; struct format_instance *fid = NULL;