mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-01-24 16:04:40 +08:00
Merge pull request #2311 from edwardhartnett/ejh_c99
This commit is contained in:
commit
6f01a87df1
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user