Skip to content

Commit

Permalink
change exit() calls to return false for health checks
Browse files Browse the repository at this point in the history
  • Loading branch information
Logicwax committed Jun 8, 2023
1 parent 8edb00b commit 339962f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions software/healthcheck.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,15 +185,15 @@ bool inmHealthCheckAddBit(bool evenBit, bool oddBit, bool even) {
inmNumSequentialZeros = 0u;
if(inmNumSequentialOnes > INM_MAX_SEQUENCE) {
fprintf(stderr, "Maximum sequence of %d 1's exceeded\n", INM_MAX_SEQUENCE);
exit(1);
return false;
}
} else {
inmTotalZeros++;
inmNumSequentialZeros++;
inmNumSequentialOnes = 0u;
if(inmNumSequentialZeros > INM_MAX_SEQUENCE) {
fprintf(stderr, "Maximum sequence of %d 0's exceeded\n", INM_MAX_SEQUENCE);
exit(1);
return false;
}
}
}
Expand Down

0 comments on commit 339962f

Please sign in to comment.