Skip to content

Commit

Permalink
zcount help return code fix
Browse files Browse the repository at this point in the history
  • Loading branch information
cardigliano committed Jun 24, 2016
1 parent 7a4a534 commit fe145c3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions userland/examples_zc/zcount.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,6 @@ void printHelp(void) {
printf("-S <core id> Pulse-time thread for inter-packet time check\n");
printf("-C Check license\n");
printf("-v Verbose\n");
exit(-1);
}

/* *************************************** */
Expand Down Expand Up @@ -276,6 +275,7 @@ int main(int argc, char* argv[]) {
switch(c) {
case 'h':
printHelp();
exit(0);
break;
case 'a':
wait_for_packet = 0;
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit fe145c3

Please sign in to comment.