Browse Source

[FIX] Usability bug fix in server_ctt

 - At present the check "help" in argv to call the
   usage() function is not handled as expected
 - In either case the the code goes into the if
   condition and returns EXIT_SUCCESS
 - Fix the minor issue so that code returns this status
   if it identifies --help or -h

Change-Id: I56876ac562647076a5b33259b2ea398b3bc5e584
Signed-off-by: Asish Ganesh <asish.g@kalycito.com>
Asish Ganesh 4 years ago
parent
commit
2ef4bfd34b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      examples/server_ctt.c

+ 1 - 1
examples/server_ctt.c

@@ -456,7 +456,7 @@ int main(int argc, char **argv) {
     signal(SIGTERM, stopHandler);
 
     for(int i = 1; i < argc; i++) {
-        if(strcmp(argv[i], "--help") ||
+        if(strcmp(argv[i], "--help") == 0 ||
            strcmp(argv[i], "-h") == 0) {
             usage();
             return EXIT_SUCCESS;