diff options
author | jb <jb@FreeBSD.org> | 1998-05-09 11:33:22 +0000 |
---|---|---|
committer | jb <jb@FreeBSD.org> | 1998-05-09 11:33:22 +0000 |
commit | 966bd989707d6877ddcd5015a4263608ecbc4aa7 (patch) | |
tree | 5627baa5574fab88f55db20052fa546f2f80e8d4 /games/primes | |
parent | 61f94cc54564bacc6ebdd2f18e49f65e5791fbac (diff) | |
download | FreeBSD-src-966bd989707d6877ddcd5015a4263608ecbc4aa7.zip FreeBSD-src-966bd989707d6877ddcd5015a4263608ecbc4aa7.tar.gz |
Cast pointers to longs, not ints.
Hopefully that's the last of the 64-bit cleaning of src/games. That is,
without adding -Wall to the compiler flags. That's not a pretty sight.
Diffstat (limited to 'games/primes')
-rw-r--r-- | games/primes/primes.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/games/primes/primes.c b/games/primes/primes.c index c2e0702..ceec7e0 100644 --- a/games/primes/primes.c +++ b/games/primes/primes.c @@ -303,10 +303,10 @@ primes(start, stop) do { /* determine the factor's initial sieve point */ q = (char *)(start%factor); /* temp storage for mod */ - if ((int)q & 0x1) { - q = &table[(factor-(int)q)/2]; + if ((long)q & 0x1) { + q = &table[(factor-(long)q)/2]; } else { - q = &table[q ? factor-((int)q/2) : 0]; + q = &table[q ? factor-((long)q/2) : 0]; } /* sive for our current factor */ for ( ; q < tab_lim; q += factor) { |