mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-22 01:49:11 +00:00
Avoid division by zero if there was no test data.
This commit is contained in:
parent
f95ca8d4f0
commit
b3586c46e2
@ -141,8 +141,10 @@ main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
printf("check_addr: %d tests run, %d errors, %d%% success rate\n",
|
||||
ntests, errors, (ntests - errors) * 100 / ntests);
|
||||
if (ntests != 0) {
|
||||
printf("check_addr: %d tests run, %d errors, %d%% success rate\n",
|
||||
ntests, errors, (ntests - errors) * 100 / ntests);
|
||||
}
|
||||
|
||||
exit(errors);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user