Merge pull request #2311 from edwardhartnett/ejh_c99

This commit is contained in:
Ward Fisher 2022-04-27 13:47:02 -06:00 committed by GitHub
commit 6f01a87df1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -381,10 +381,12 @@ NC_hashmapdeactivate(NC_hashmap* map, uintptr_t data)
/* This will currently fail if `n > 180503 * 180503` */
static int isPrime(size_t n)
{
size_t i;
if (n <= 1) return 0;
if (n <= 3) return 1;
for (size_t i=1; i < NC_nprimes - 1; i++) {
for (i=1; i < NC_nprimes - 1; i++) {
size_t prime = NC_primes[i];
if (n % prime == 0) {
return 0;