ID: 28 - 'lib/ipmi_delloem.c' - clean up the code

ipmi_lcd_get_info - simplify - Remove pointless ``if () { } else { }'' and
return immediately on error.
This commit is contained in:
Zdenek Styblik 2013-07-07 11:52:06 +00:00
parent 516fe51505
commit eb65a625a2

View File

@ -975,7 +975,7 @@ ipmi_lcd_get_info(struct ipmi_intf * intf)
if (ipmi_lcd_get_configure_command(intf, &command) != 0) { if (ipmi_lcd_get_configure_command(intf, &command) != 0) {
return -1; return -1;
} else { }
if (command == IPMI_DELL_LCD_CONFIG_DEFAULT) { if (command == IPMI_DELL_LCD_CONFIG_DEFAULT) {
memset(lcdstring,0,IPMI_DELL_LCD_STRING_LENGTH_MAX+1); memset(lcdstring,0,IPMI_DELL_LCD_STRING_LENGTH_MAX+1);
if (ipmi_lcd_get_platform_model_name(intf, lcdstring, if (ipmi_lcd_get_platform_model_name(intf, lcdstring,
@ -1011,7 +1011,6 @@ ipmi_lcd_get_info(struct ipmi_intf * intf)
printf(" No lines to show\n"); printf(" No lines to show\n");
} }
} }
}
return 0; return 0;
} }
/* /*