diff --git a/userland/examples_zc/zcount.c b/userland/examples_zc/zcount.c index 50858bf8a5..0996ecd6e4 100644 --- a/userland/examples_zc/zcount.c +++ b/userland/examples_zc/zcount.c @@ -182,7 +182,6 @@ void printHelp(void) { printf("-S Pulse-time thread for inter-packet time check\n"); printf("-C Check license\n"); printf("-v Verbose\n"); - exit(-1); } /* *************************************** */ @@ -276,6 +275,7 @@ int main(int argc, char* argv[]) { switch(c) { case 'h': printHelp(); + exit(0); break; case 'a': wait_for_packet = 0; @@ -308,8 +308,10 @@ int main(int argc, char* argv[]) { } } - if (device == NULL) printHelp(); - if (cluster_id < 0) printHelp(); + if (device == NULL || cluster_id < 0) { + printHelp(); + exit(-1); + } buffer_len = max_packet_len(device);