ID: 50 - ipmi_hpmfwupg needs a clean up

HpmfwupgQuerySelftestResult() - kill one level of indentation.
This commit is contained in:
Zdenek Styblik 2013-10-11 04:14:59 +00:00
parent f19ed0a90b
commit 60a3e63429

View File

@ -2233,26 +2233,25 @@ HpmfwupgQuerySelftestResult(struct ipmi_intf *intf, struct HpmfwupgQuerySelftest
} while (rsp } while (rsp
&& (rsp->ccode == HPMFWUPG_COMMAND_IN_PROGRESS) && (rsp->ccode == HPMFWUPG_COMMAND_IN_PROGRESS)
&& (timeoutSec2 - timeoutSec1 < selfTestTimeout)); && (timeoutSec2 - timeoutSec1 < selfTestTimeout));
if (rsp) { if (rsp == NULL) {
if (rsp->ccode == 0x00) { lprintf(LOG_NOTICE, "Error getting upgrade status\n");
memcpy(&pCtx->resp, rsp->data, return HPMFWUPG_ERROR;
sizeof(struct HpmfwupgQuerySelftestResultResp)); }
if (verbose) { if (rsp->ccode == 0x00) {
lprintf(LOG_NOTICE, "Self test results:"); memcpy(&pCtx->resp, rsp->data,
lprintf(LOG_NOTICE, "Result1 = %x", sizeof(struct HpmfwupgQuerySelftestResultResp));
pCtx->resp.result1); if (verbose) {
lprintf(LOG_NOTICE, "Result2 = %x", lprintf(LOG_NOTICE, "Self test results:");
pCtx->resp.result2); lprintf(LOG_NOTICE, "Result1 = %x",
} pCtx->resp.result1);
} else { lprintf(LOG_NOTICE, "Result2 = %x",
lprintf(LOG_NOTICE, "Error getting self test results"); pCtx->resp.result2);
lprintf(LOG_NOTICE, "compcode=0x%x: %s",
rsp->ccode,
val2str(rsp->ccode, completion_code_vals));
rc = HPMFWUPG_ERROR;
} }
} else { } else {
lprintf(LOG_NOTICE, "Error getting upgrade status\n"); lprintf(LOG_NOTICE, "Error getting self test results");
lprintf(LOG_NOTICE, "compcode=0x%x: %s",
rsp->ccode,
val2str(rsp->ccode, completion_code_vals));
rc = HPMFWUPG_ERROR; rc = HPMFWUPG_ERROR;
} }
return rc; return rc;