summaryrefslogtreecommitdiffstats
path: root/snake
diff options
context:
space:
mode:
authorcgd <cgd@NetBSD.org>1994-04-01 03:02:32 +0000
committercgd <cgd@NetBSD.org>1994-04-01 03:02:32 +0000
commit45bdf9e0f98fa72f3359628de1719ad379215b24 (patch)
treeca9132ce0d666fa26e44a7d0cee41aad9709c4a5 /snake
parenteb873f88beeeda8ac105d51ebf86350d5df14e46 (diff)
downloadbsdgames-darwin-45bdf9e0f98fa72f3359628de1719ad379215b24.tar.gz
bsdgames-darwin-45bdf9e0f98fa72f3359628de1719ad379215b24.zip
evil lseek casts...
Diffstat (limited to 'snake')
-rw-r--r--snake/snake/snake.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/snake/snake/snake.c b/snake/snake/snake.c
index c9892043..cbf401eb 100644
--- a/snake/snake/snake.c
+++ b/snake/snake/snake.c
@@ -39,7 +39,7 @@ char copyright[] =
#ifndef lint
/*static char sccsid[] = "from: @(#)snake.c 5.10 (Berkeley) 2/28/91";*/
-static char rcsid[] = "$Id: snake.c,v 1.3 1993/08/01 18:51:11 mycroft Exp $";
+static char rcsid[] = "$Id: snake.c,v 1.4 1994/04/01 03:02:32 cgd Exp $";
#endif /* not lint */
/*
@@ -484,14 +484,14 @@ int iscore, flag;
/* Figure out what happened in the past */
read(rawscores, &allbscore, sizeof(short));
read(rawscores, &allbwho, sizeof(short));
- lseek(rawscores, ((long)uid)*sizeof(short), 0);
+ lseek(rawscores, uid*sizeof(short), 0);
read(rawscores, &oldbest, sizeof(short));
if (!flag)
return (score > oldbest ? 1 : 0);
/* Update this jokers best */
if (score > oldbest) {
- lseek(rawscores, ((long)uid)*sizeof(short), 0);
+ lseek(rawscores, uid*sizeof(short), 0);
write(rawscores, &score, sizeof(short));
pr("You bettered your previous best of $%d\n", oldbest);
} else
@@ -500,7 +500,7 @@ int iscore, flag;
/* See if we have a new champ */
p = getpwuid(allbwho);
if (p == NULL || score > allbscore) {
- lseek(rawscores, (long)0, 0);
+ lseek(rawscores, 0, 0);
write(rawscores, &score, sizeof(short));
write(rawscores, &uid, sizeof(short));
if (allbwho)