diff options
author | dholland <dholland@NetBSD.org> | 2014-03-22 23:42:48 +0000 |
---|---|---|
committer | dholland <dholland@NetBSD.org> | 2014-03-22 23:42:48 +0000 |
commit | cae864aa06264f96ed70bc6b2ae00026ea996981 (patch) | |
tree | cf9ed1dd29232d24f805513283dc0ab42305cb8f | |
parent | eb5e62efedff35dc46cef0af9537156f47e6db62 (diff) | |
download | bsdgames-darwin-cae864aa06264f96ed70bc6b2ae00026ea996981.tar.gz bsdgames-darwin-cae864aa06264f96ed70bc6b2ae00026ea996981.tar.zst bsdgames-darwin-cae864aa06264f96ed70bc6b2ae00026ea996981.zip |
Use uid_t to hold getuid() results, and don't check getuid for failure
as it isn't allowed to fail.
-rw-r--r-- | canfield/canfield/canfield.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/canfield/canfield/canfield.c b/canfield/canfield/canfield.c index a1206dcf..b9b1434e 100644 --- a/canfield/canfield/canfield.c +++ b/canfield/canfield/canfield.c @@ -1,4 +1,4 @@ -/* $NetBSD: canfield.c,v 1.28 2011/05/23 22:46:35 joerg Exp $ */ +/* $NetBSD: canfield.c,v 1.29 2014/03/22 23:42:48 dholland Exp $ */ /* * Copyright (c) 1980, 1993 @@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1993\ #if 0 static char sccsid[] = "@(#)canfield.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: canfield.c,v 1.28 2011/05/23 22:46:35 joerg Exp $"); +__RCSID("$NetBSD: canfield.c,v 1.29 2014/03/22 23:42:48 dholland Exp $"); #endif #endif /* not lint */ @@ -168,7 +168,7 @@ static bool mtfdone, Cflag = FALSE; #define BETTINGBOX 2 #define NOBOX 3 static int status = INSTRUCTIONBOX; -static int uid; +static uid_t uid; /* * Basic betting costs @@ -1643,8 +1643,6 @@ initall(void) time(&acctstart); initdeck(deck); uid = getuid(); - if (uid < 0) - uid = 0; dbfd = open(_PATH_SCORE, O_RDWR); /* Revoke setgid privileges */ |