Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Style changes

  • Loading branch information...
commit b0a1dd11551eae4ac780ef277f1f54d07e99a6c7 1 parent 8a59816
@joshuaclayton authored
Showing with 2 additions and 6 deletions.
  1. +2 −6 ext/sieve/sieve.c
View
8 ext/sieve/sieve.c
@@ -32,16 +32,12 @@ static VALUE sieve(const VALUE self) {
if(current_square > number) { break; }
long n;
- for(n = current_square; n < number; n += i) {
- CLEARBIT(results, n);
- }
+ for(n = current_square; n < number; n += i) { CLEARBIT(results, n); }
}
VALUE primes_array = rb_ary_new();
for(i = 0; i < number; i++) {
- if(BITSET(results, i)) {
- rb_ary_push(primes_array, LONG2FIX(i));
- }
+ if(BITSET(results, i)) { rb_ary_push(primes_array, LONG2FIX(i)); }
}
free(results);
Please sign in to comment.
Something went wrong with that request. Please try again.