summaryrefslogtreecommitdiffstats
path: root/plugins-root/check_icmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins-root/check_icmp.c')
-rw-r--r--plugins-root/check_icmp.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/plugins-root/check_icmp.c b/plugins-root/check_icmp.c
index e59e92d..c3be2ef 100644
--- a/plugins-root/check_icmp.c
+++ b/plugins-root/check_icmp.c
@@ -448,6 +448,14 @@ main(int argc, char **argv)
448 packets = 5; 448 packets = 5;
449 } 449 }
450 450
451 /* support "--help" and "--version" */
452 if(argc == 2) {
453 if(!strcmp(argv[1], "--help"))
454 strcpy(argv[1], "-h");
455 if(!strcmp(argv[1], "--version"))
456 strcpy(argv[1], "-V");
457 }
458
451 /* Parse protocol arguments first */ 459 /* Parse protocol arguments first */
452 for(i = 1; i < argc; i++) { 460 for(i = 1; i < argc; i++) {
453 while((arg = getopt(argc, argv, opts_str)) != EOF) { 461 while((arg = getopt(argc, argv, opts_str)) != EOF) {
@@ -552,14 +560,6 @@ main(int argc, char **argv)
552 /* Parse extra opts if any */ 560 /* Parse extra opts if any */
553 argv=np_extra_opts(&argc, argv, progname); 561 argv=np_extra_opts(&argc, argv, progname);
554 562
555 /* support "--help" and "--version" */
556 if(argc == 2) {
557 if(!strcmp(argv[1], "--help"))
558 strcpy(argv[1], "-h");
559 if(!strcmp(argv[1], "--version"))
560 strcpy(argv[1], "-V");
561 }
562
563 argv = &argv[optind]; 563 argv = &argv[optind];
564 while(*argv) { 564 while(*argv) {
565 add_target(*argv); 565 add_target(*argv);