On 11/4/22 3:40 AM, Stefan Roesch wrote:
+struct option longopts[] = +{ + {"address" , 1, NULL, 'a'}, + {"busy" , 0, NULL, 'b'}, + {"help" , 0, NULL, 'h'}, + {"num_pings", 1, NULL, 'n'}, + {"port" , 1, NULL, 'p'}, + {"sqpoll" , 0, NULL, 's'}, + {"timeout" , 1, NULL, 't'},
Inconsistent indentation.
+ if (strlen(opt.addr) == 0) { + fprintf(stderr, "address option is mandatory\n"); + printUsage(argv[0]); + exit(-1); + }
Don't use integer literal like 0 or -1 as the exit code in tests, use the exit code protocol: T_EXIT_PASS T_EXIT_FAIL T_EXIT_SKIP They are defined in test/helpers.h. -- Ammar Faizi