Open AlexanderAmelkin opened 11 years ago
Reported by: Zdenek Styblik Original Ticket: ipmitool/bugs/206
\- if \(argc == 0 || strncmp\(argv\[0\], "help", 4\) == 0\) \{ \- ipmi\_event\_usage\(\); \- return 0; \- \}
+ if (argc == 0) { + lprintf(LOG_ERR, "Not enough parameters given."); + ipmi_event_usage(); + return (-1); + } else if (strncmp(argv[0], "help", 4) == 0) { + ipmi_event_usage(); + return 0; + }
This is also wrong:
if (strncmp(argv[0], "file", 4) == 0) { if (argc < 2) { ipmi_event_usage(); return 0; } return ipmi_event_fromfile(intf, argv[1]); }
Original comment by: Zdenek Styblik
Reported by: Zdenek Styblik Original Ticket: ipmitool/bugs/206
+ if (argc == 0) { + lprintf(LOG_ERR, "Not enough parameters given."); + ipmi_event_usage(); + return (-1); + } else if (strncmp(argv[0], "help", 4) == 0) { + ipmi_event_usage(); + return 0; + }
if (strncmp(argv[0], "file", 4) == 0) { if (argc < 2) { ipmi_event_usage(); return 0; } return ipmi_event_fromfile(intf, argv[1]); }