From 6c578738ca10d94bdd147f9e552e6bc0d34d4c7a Mon Sep 17 00:00:00 2001 From: wangyu Date: Fri, 18 Aug 2017 00:58:40 +0800 Subject: [PATCH] trival --- main.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/main.cpp b/main.cpp index 4e6336c..148c0d0 100755 --- a/main.cpp +++ b/main.cpp @@ -2472,6 +2472,12 @@ void process_arg(int argc, char *argv[]) myexit(0); } } + if (argc == 1) + { + print_help(); + myexit(-1); + } + for (i = 0; i < argc; i++) { if(strcmp(argv[i],"--log-level")==0) @@ -2502,11 +2508,7 @@ void process_arg(int argc, char *argv[]) } log_bare(log_info, "\n"); - if (argc == 1) - { - print_help(); - myexit(-1); - } + int no_l = 1, no_r = 1; while ((opt = getopt_long(argc, argv, "l:r:schk:ag",long_options,&option_index)) != -1) {