From e2304271388f1828e0dba359f2bdf169a8e79b4a Mon Sep 17 00:00:00 2001 From: Zdenek Styblik Date: Wed, 8 Feb 2012 14:50:37 +0000 Subject: [PATCH] Changes return value of ipmi_lan_stats_get() and ipmi_lan_stats_clear() on error in 'lib/ipmi_lanp.c'. Changes return value from 0 to (-1). --- ipmitool/lib/ipmi_lanp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ipmitool/lib/ipmi_lanp.c b/ipmitool/lib/ipmi_lanp.c index 81ae039..5b22af7 100644 --- a/ipmitool/lib/ipmi_lanp.c +++ b/ipmitool/lib/ipmi_lanp.c @@ -2025,13 +2025,13 @@ ipmi_lan_stats_get(struct ipmi_intf * intf, uint8_t chan) rsp = intf->sendrecv(intf, &req); if (rsp == NULL) { lprintf(LOG_ERR, "Get LAN Stats command failed"); - return 0; + return (-1); } if (rsp->ccode > 0) { lprintf(LOG_ERR, "Get LAN Stats command failed: %s", val2str(rsp->ccode, completion_code_vals)); - return 0; + return (-1); } if (verbose > 1) { @@ -2111,13 +2111,13 @@ ipmi_lan_stats_clear(struct ipmi_intf * intf, uint8_t chan) rsp = intf->sendrecv(intf, &req); if (rsp == NULL) { lprintf(LOG_INFO, "Get LAN Stats command failed"); - return 0; + return (-1); } if (rsp->ccode > 0) { lprintf(LOG_INFO, "Get LAN Stats command failed: %s", val2str(rsp->ccode, completion_code_vals)); - return 0; + return (-1); } return rc;