summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosef Moellers <jmoellers@suse.de>2019-01-24 09:24:39 +0100
committerAlexander Amelkin <mocbuhtig@amelkin.msk.ru>2019-01-24 15:22:21 +0300
commit4631d3f9429be573145a137e49c34d420abf566c (patch)
treec45ea956d6052b89222cb93a481dde1e12095789
parent272d9d0d9b29f41b6b10a870d856fec8d19233e2 (diff)
downloadipmitool-4631d3f9429be573145a137e49c34d420abf566c.tar.gz
hpm: Minor refactoring
Remove an `if()` with a condition that is always true. Merge two calls to time() into one.
-rw-r--r--lib/ipmi_hpmfwupg.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/lib/ipmi_hpmfwupg.c b/lib/ipmi_hpmfwupg.c
index 4783eec..c589009 100644
--- a/lib/ipmi_hpmfwupg.c
+++ b/lib/ipmi_hpmfwupg.c
@@ -2291,13 +2291,9 @@ HpmfwupgWaitLongDurationCmd(struct ipmi_intf *intf,
}
}
}
- if (rc == HPMFWUPG_SUCCESS) {
- /* Poll upgrade status until completion or timeout*/
- timeoutSec1 = time(NULL);
- timeoutSec2 = time(NULL);
- rc = HpmfwupgGetUpgradeStatus(intf, &upgStatusCmd,
- pFwupgCtx, 1);
- }
+ /* Poll upgrade status until completion or timeout*/
+ timeoutSec2 = timeoutSec1 = time(NULL);
+ rc = HpmfwupgGetUpgradeStatus(intf, &upgStatusCmd, pFwupgCtx, 1);
while (
/* With KCS: Cover the case where we sometime
* receive d5 (on the first get status) from