Permalink
Browse files

Fix: Fencing: Remove shadow definition and use of variable 'progress'

  • Loading branch information...
1 parent 0597697 commit 0debc914b1dda2c4d04f4a33a3b38fbb4d873b1b @beekhof committed Feb 28, 2014
Showing with 1 addition and 6 deletions.
  1. +1 −6 lib/fencing/st_client.c
View
@@ -2421,7 +2421,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;
@@ -2454,7 +2453,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) {
@@ -2472,10 +2471,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);

0 comments on commit 0debc91

Please sign in to comment.