commit 29d542447da8bd120072a7fa8dd6df832f0856eb Author: Andrew Beekhof Date: Fri Feb 28 14:11:23 2014 +1100 Fix: Fencing: Remove shadow definition and use of variable 'progress' (cherry picked from commit 0debc914b1dda2c4d04f4a33a3b38fbb4d873b1b) diff --git a/lib/fencing/st_client.c b/lib/fencing/st_client.c index 4deb71f..95ea0f7 100644 --- a/lib/fencing/st_client.c +++ b/lib/fencing/st_client.c @@ -2420,7 +2420,6 @@ stonith_api_time(uint32_t nodeid, const char *uname, bool in_progress) char *name = NULL; time_t when = 0; - time_t progress = 0; stonith_t *st = NULL; stonith_history_t *history, *hp = NULL; enum stonith_call_options opts = st_opt_sync_call; @@ -2453,7 +2452,7 @@ stonith_api_time(uint32_t nodeid, const char *uname, bool in_progress) if (in_progress) { progress++; if (hp->state != st_done && hp->state != st_failed) { - progress = time(NULL); + when = time(NULL); } } else if (hp->state == st_done) { @@ -2471,10 +2470,6 @@ stonith_api_time(uint32_t nodeid, const char *uname, bool in_progress) } } - if (progress) { - when = progress; - } - if (st) { st->cmds->disconnect(st); stonith_api_delete(st);