mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-10 18:47:22 +00:00
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:
parent
c726a09482
commit
ed1865da0a
@ -193,18 +193,17 @@ ipmi_pef_msg_exchange(struct ipmi_intf * intf, struct ipmi_rq * req, char * txt)
|
|||||||
// common IPMItool rqst/resp handling
|
// common IPMItool rqst/resp handling
|
||||||
*/
|
*/
|
||||||
struct ipmi_rs * rsp = intf->sendrecv(intf, req);
|
struct ipmi_rs * rsp = intf->sendrecv(intf, req);
|
||||||
if (!rsp)
|
if (!rsp) {
|
||||||
return(NULL);
|
return(NULL);
|
||||||
if (rsp->ccode == 0x80) {
|
} else if (rsp->ccode == 0x80) {
|
||||||
return(NULL); /* Do not output error, just unsupported parameters */
|
return(NULL); /* Do not output error, just unsupported parameters */
|
||||||
}
|
} else if (rsp->ccode) {
|
||||||
else if (rsp->ccode) {
|
lprintf(LOG_ERR, " **Error %x in '%s' command", rsp->ccode, txt);
|
||||||
lprintf(LOG_ERR, " **Error %x in '%s' command",
|
|
||||||
rsp ? rsp->ccode : 0, txt);
|
|
||||||
return(NULL);
|
return(NULL);
|
||||||
}
|
}
|
||||||
if (verbose > 2)
|
if (verbose > 2) {
|
||||||
printbuf(rsp->data, rsp->data_len, txt);
|
printbuf(rsp->data, rsp->data_len, txt);
|
||||||
|
}
|
||||||
return(rsp);
|
return(rsp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user