mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-10 18:47:22 +00:00
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:
parent
516fe51505
commit
eb65a625a2
@ -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;
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user