Permalink
Browse files

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

  • Loading branch information...
1 parent 7d54502 commit 61636390cf4532236b55b3d6c94d7d2181b726c6 @beekhof committed Feb 28, 2014
Showing with 2 additions and 7 deletions.
  1. +1 −6 lib/fencing/st_client.c
  2. +1 −1 lib/services/systemd.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);
View
@@ -141,7 +141,7 @@ systemd_unit_by_name(const gchar * arg_name, gchar ** out_unit)
name = systemd_service_name(arg_name);
- while(*out_unit == NULL) {
+ while(TRUE) {
msg = systemd_new_method(BUS_NAME".Manager", method);
CRM_ASSERT(msg != NULL);

0 comments on commit 6163639

Please sign in to comment.