summaryrefslogtreecommitdiffstats
path: root/games/primes
diff options
context:
space:
mode:
authorjb <jb@FreeBSD.org>1998-05-09 11:33:22 +0000
committerjb <jb@FreeBSD.org>1998-05-09 11:33:22 +0000
commit966bd989707d6877ddcd5015a4263608ecbc4aa7 (patch)
tree5627baa5574fab88f55db20052fa546f2f80e8d4 /games/primes
parent61f94cc54564bacc6ebdd2f18e49f65e5791fbac (diff)
downloadFreeBSD-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.c6
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) {
OpenPOWER on IntegriCloud