Skip to content

Commit

Permalink
Dangling else
Browse files Browse the repository at this point in the history
  • Loading branch information
LivInTheLookingGlass committed Sep 4, 2024
1 parent 2cd78ff commit 15a5c7e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion c/src/include/primes.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ uintmax_t advance_prime_counter(prime_counter *pc) {
}
}
if (!broken) { // is prime
if (pc->idx == prime_cache_idx)
if (pc->idx == prime_cache_idx) {
#ifdef PRIME_CACHE_SIZE_LIMIT
if (prime_cache_size == prime_cache_idx && prime_cache_size < PRIME_CACHE_SIZE_LIMIT)
#else
Expand All @@ -101,6 +101,7 @@ uintmax_t advance_prime_counter(prime_counter *pc) {
}
else
prime_cache[prime_cache_idx++] = p;
}
pc->idx++;
if ((pc->exhausted = (p >= pc->stop)))
return 0;
Expand Down

0 comments on commit 15a5c7e

Please sign in to comment.