From b5ca0e4da5f9e9439390a53e0d218c013a0b420e Mon Sep 17 00:00:00 2001 From: hubertf Date: Sat, 29 Aug 1998 22:47:56 +0000 Subject: Use symbolic constants for seek(), open(). Fixed as per PR 6057 by Joseph Myers . --- canfield/cfscores/cfscores.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'canfield/cfscores') diff --git a/canfield/cfscores/cfscores.c b/canfield/cfscores/cfscores.c index dd0fa93e..e5830fef 100644 --- a/canfield/cfscores/cfscores.c +++ b/canfield/cfscores/cfscores.c @@ -1,4 +1,4 @@ -/* $NetBSD: cfscores.c,v 1.5 1997/10/11 02:41:45 lukem Exp $ */ +/* $NetBSD: cfscores.c,v 1.6 1998/08/29 22:47:57 hubertf Exp $ */ /* * Copyright (c) 1983, 1993 @@ -43,7 +43,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 1993\n\ #if 0 static char sccsid[] = "@(#)cfscores.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: cfscores.c,v 1.5 1997/10/11 02:41:45 lukem Exp $"); +__RCSID("$NetBSD: cfscores.c,v 1.6 1998/08/29 22:47:57 hubertf Exp $"); #endif #endif /* not lint */ @@ -83,7 +83,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) err(2, "open %s", _PATH_SCORE); setpwent(); @@ -126,7 +126,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) warn("lseek %s", _PATH_SCORE); i = read(dbfd, (char *)&total, sizeof(total)); -- cgit v1.2.3-56-ge451