summaryrefslogtreecommitdiff
path: root/games/canfield/cfscores
diff options
context:
space:
mode:
authorPaul Janzen <pjanzen@cvs.openbsd.org>1998-08-29 23:00:10 +0000
committerPaul Janzen <pjanzen@cvs.openbsd.org>1998-08-29 23:00:10 +0000
commit48adb27998c1144d802791e25c55bed63e44d7f1 (patch)
tree35c1aab77ceac8a2dad5fdada422107874cb8e04 /games/canfield/cfscores
parentdb4ff0537a285137d22d610a8d229d30955181f3 (diff)
use names for constants in lseek() and open(); NetBSD PR6057; jsm28@cam.ac.uk
Diffstat (limited to 'games/canfield/cfscores')
-rw-r--r--games/canfield/cfscores/cfscores.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/games/canfield/cfscores/cfscores.c b/games/canfield/cfscores/cfscores.c
index 4f973265fde..c3f9fe3be89 100644
--- a/games/canfield/cfscores/cfscores.c
+++ b/games/canfield/cfscores/cfscores.c
@@ -48,7 +48,10 @@ static char rcsid[] = "$NetBSD: cfscores.c,v 1.3 1995/03/21 15:08:37 cgd Exp $";
#endif /* not lint */
#include <sys/types.h>
+#include <fcntl.h>
#include <pwd.h>
+#include <stdio.h>
+#include <unistd.h>
#include "pathnames.h"
struct betinfo {
@@ -75,7 +78,7 @@ main(argc, argv)
printf("Usage: cfscores [user]\n");
exit(1);
}
- dbfd = open(_PATH_SCORE, 0);
+ dbfd = open(_PATH_SCORE, O_RDONLY);
if (dbfd < 0) {
perror(_PATH_SCORE);
exit(2);
@@ -124,7 +127,7 @@ printuser(pw, printfail)
printf("Bad uid %d\n", pw->pw_uid);
return;
}
- i = lseek(dbfd, pw->pw_uid * sizeof(struct betinfo), 0);
+ i = lseek(dbfd, pw->pw_uid * sizeof(struct betinfo), SEEK_SET);
if (i < 0) {
perror("lseek");
return;