aboutsummaryrefslogtreecommitdiff
path: root/games/primes
diff options
context:
space:
mode:
authorJohn Birrell <jb@FreeBSD.org>1998-05-09 11:33:22 +0000
committerJohn Birrell <jb@FreeBSD.org>1998-05-09 11:33:22 +0000
commita217dc6fbc8cf5ad4eecf4bcdbb8dd4b6aa1456e (patch)
tree557cf526c615f36a5128a2b913a3393d79be22ac /games/primes
parent6f6040ffb1601d62b287a426f35c862cb0429788 (diff)
downloadsrc-a217dc6fbc8cf5ad4eecf4bcdbb8dd4b6aa1456e.tar.gz
src-a217dc6fbc8cf5ad4eecf4bcdbb8dd4b6aa1456e.zip
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.
Notes
Notes: svn path=/head/; revision=35892
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 c2e0702984ba..ceec7e0e060a 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) {