Skip to content

Commit

Permalink
declare float out of the loop
Browse files Browse the repository at this point in the history
  • Loading branch information
FrancescAlted committed Jul 30, 2019
1 parent f6f62b9 commit 7d8ef2e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/test_forksafe.c
Expand Up @@ -42,7 +42,8 @@ static const char *test_forksafe(void) {

int success = 0;
int status = 0;
for(float sec = 0; sec < 1; ) {
float sec = 0;
while (sec < 1) {
if(waitpid(newpid, &status, WNOHANG) != 0) {
success = 1;
break;
Expand Down

0 comments on commit 7d8ef2e

Please sign in to comment.