From 53df70235f9241d394ffab12850b7062a278a4e3 Mon Sep 17 00:00:00 2001 From: Jim Mankovich Date: Wed, 2 May 2012 13:17:04 +0000 Subject: [PATCH] Commit removes, resp. moves further in the code, unnecessary query to IPMI device in ipmi_lanp_main(). It doesn't make sense to query IPMI device only to show help and terminate immediately. Commited for Duncan Idaho --- ipmitool/lib/ipmi_lanp.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ipmitool/lib/ipmi_lanp.c b/ipmitool/lib/ipmi_lanp.c index 83f49e5..86e6652 100644 --- a/ipmitool/lib/ipmi_lanp.c +++ b/ipmitool/lib/ipmi_lanp.c @@ -2230,7 +2230,7 @@ int ipmi_lanp_main(struct ipmi_intf * intf, int argc, char ** argv) { int rc = 0; - uint8_t chan = find_lan_channel(intf, 1); + uint8_t chan = 0; if (argc == 0) { print_lan_usage(); @@ -2238,7 +2238,11 @@ ipmi_lanp_main(struct ipmi_intf * intf, int argc, char ** argv) } else if (strncmp(argv[0], "help", 4) == 0) { print_lan_usage(); return 0; - } else if (strncmp(argv[0], "printconf", 9) == 0 || + } + + chan = find_lan_channel(intf, 1); + + if (strncmp(argv[0], "printconf", 9) == 0 || strncmp(argv[0], "print", 5) == 0) { if (argc > 2) {