Avoid division by zero if there was no test data.
This commit is contained in:
@@ -141,8 +141,10 @@ main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ntests != 0) {
|
||||||
printf("check_addr: %d tests run, %d errors, %d%% success rate\n",
|
printf("check_addr: %d tests run, %d errors, %d%% success rate\n",
|
||||||
ntests, errors, (ntests - errors) * 100 / ntests);
|
ntests, errors, (ntests - errors) * 100 / ntests);
|
||||||
|
}
|
||||||
|
|
||||||
exit(errors);
|
exit(errors);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user