ID: 3600928 - 'lib/ipmi_pef.c' use 'else if ()' instead of 'if ()'

Commit trades 'if ()' for 'else if ()' and removes one pointless 'if ()' since
rsp isn't NULL at this point.
This commit is contained in:
Zdenek Styblik 2013-02-13 11:35:21 +00:00
parent c726a09482
commit ed1865da0a

View File

@ -193,18 +193,17 @@ ipmi_pef_msg_exchange(struct ipmi_intf * intf, struct ipmi_rq * req, char * txt)
// common IPMItool rqst/resp handling
*/
struct ipmi_rs * rsp = intf->sendrecv(intf, req);
if (!rsp)
if (!rsp) {
return(NULL);
if (rsp->ccode == 0x80) {
} else if (rsp->ccode == 0x80) {
return(NULL); /* Do not output error, just unsupported parameters */
}
else if (rsp->ccode) {
lprintf(LOG_ERR, " **Error %x in '%s' command",
rsp ? rsp->ccode : 0, txt);
} else if (rsp->ccode) {
lprintf(LOG_ERR, " **Error %x in '%s' command", rsp->ccode, txt);
return(NULL);
}
if (verbose > 2)
if (verbose > 2) {
printbuf(rsp->data, rsp->data_len, txt);
}
return(rsp);
}