From a70de993cf9a9c431451952d0eb17e57ed4905a2 Mon Sep 17 00:00:00 2001 From: Zdenek Styblik Date: Tue, 12 Feb 2013 12:23:11 +0000 Subject: [PATCH] ID: 3600910 - 'lib/ipmi_delloem.c' use 'else if' instead of 'if', use 'rc' Commit changes are related to ipmi_ldc_set_lock() in 'lib/ipmi_delloem.c': * use 'else if' instead of 'if' since it's the same given the context and probably better * use 'rc' variable, since it's there, rather than 'return' Note: ipmi_lcd_set_lock() would use some re-write. Reported-by: Ales Ledvinka --- ipmitool/lib/ipmi_delloem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ipmitool/lib/ipmi_delloem.c b/ipmitool/lib/ipmi_delloem.c index ad95ca7..67dcada 100644 --- a/ipmitool/lib/ipmi_delloem.c +++ b/ipmitool/lib/ipmi_delloem.c @@ -1463,10 +1463,10 @@ ipmi_lcd_set_lock(struct ipmi_intf * intf, char lock) lprintf(LOG_ERR, " Error setting LCD status"); rc= -1; } - if ((rsp->ccode == 0xc1)||(rsp->ccode == 0xcb)) + else if ((rsp->ccode == 0xc1) || (rsp->ccode == 0xcb)) { lprintf(LOG_ERR, " Error getting LCD status: Command not supported on this system."); - return -1; + rc = -1; } else if (rsp->ccode > 0) {