From 4631d3f9429be573145a137e49c34d420abf566c Mon Sep 17 00:00:00 2001 From: Josef Moellers Date: Thu, 24 Jan 2019 09:24:39 +0100 Subject: [PATCH] hpm: Minor refactoring Remove an `if()` with a condition that is always true. Merge two calls to time() into one. --- lib/ipmi_hpmfwupg.c | 10 +++------- 1 file 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