summaryrefslogtreecommitdiffstats
path: root/cribbage/crib.c
diff options
context:
space:
mode:
authormikel <mikel@NetBSD.org>1997-07-10 06:47:29 +0000
committermikel <mikel@NetBSD.org>1997-07-10 06:47:29 +0000
commit3638c6860decfacc7974156434d4dfdd31a47443 (patch)
treea9ae7c77eed0cc7616f27a050fc8dadeccaa2071 /cribbage/crib.c
parent6170d87a62457fdea2faa68464de66f4ff98e654 (diff)
downloadbsdgames-darwin-3638c6860decfacc7974156434d4dfdd31a47443.tar.gz
bsdgames-darwin-3638c6860decfacc7974156434d4dfdd31a47443.tar.zst
bsdgames-darwin-3638c6860decfacc7974156434d4dfdd31a47443.zip
make explicit comparisons to NULL, s/rindex/strrchr/
Diffstat (limited to 'cribbage/crib.c')
-rw-r--r--cribbage/crib.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/cribbage/crib.c b/cribbage/crib.c
index 145083b2..cf59d5aa 100644
--- a/cribbage/crib.c
+++ b/cribbage/crib.c
@@ -1,4 +1,4 @@
-/* $NetBSD: crib.c,v 1.6 1997/07/09 06:25:45 phil Exp $ */
+/* $NetBSD: crib.c,v 1.7 1997/07/10 06:47:29 mikel Exp $ */
/*-
* Copyright (c) 1980, 1993
@@ -43,7 +43,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)crib.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$NetBSD: crib.c,v 1.6 1997/07/09 06:25:45 phil Exp $";
+static char rcsid[] = "$NetBSD: crib.c,v 1.7 1997/07/10 06:47:29 mikel Exp $";
#endif
#endif /* not lint */
@@ -126,7 +126,7 @@ main(argc, argv)
playing = (getuchar() == 'Y');
} while (playing);
- if (f = fopen(_PATH_LOG, "a")) {
+ if ((f = fopen(_PATH_LOG, "a")) != NULL) {
(void)fprintf(f, "%s: won %5.5d, lost %5.5d\n",
getlogin(), cgames, pgames);
(void) fclose(f);