summaryrefslogtreecommitdiff
path: root/games/rogue/save.c
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2006-03-06 17:28:59 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2006-03-06 17:28:59 +0000
commitd25ed8e7ffa94234f3536f27a3f978718aeb8b47 (patch)
tree8cfa11f2a9b92a4d8562ee9642638c09538f5281 /games/rogue/save.c
parentd6cecf1ec37ed7585ab70bd48432a400cb97d067 (diff)
open(2) returns -1 on error, not NULL
From: Alexey Dobriyan <adobriyan@gmail.com>
Diffstat (limited to 'games/rogue/save.c')
-rw-r--r--games/rogue/save.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/games/rogue/save.c b/games/rogue/save.c
index cbc67406325..b179417c566 100644
--- a/games/rogue/save.c
+++ b/games/rogue/save.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: save.c,v 1.10 2004/01/21 19:12:13 espie Exp $ */
+/* $OpenBSD: save.c,v 1.11 2006/03/06 17:28:58 henning Exp $ */
/* $NetBSD: save.c,v 1.3 1995/04/22 10:28:21 cgd Exp $ */
/*
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)save.c 8.1 (Berkeley) 5/31/93";
#else
-static const char rcsid[] = "$OpenBSD: save.c,v 1.10 2004/01/21 19:12:13 espie Exp $";
+static const char rcsid[] = "$OpenBSD: save.c,v 1.11 2006/03/06 17:28:58 henning Exp $";
#endif
#endif /* not lint */
@@ -180,7 +180,7 @@ restore(fname)
int new_file_id, saved_file_id;
if (((new_file_id = md_get_file_id(fname)) == -1) ||
- ((fp = open(fname, O_RDONLY, 0)) == NULL)) {
+ ((fp = open(fname, O_RDONLY, 0)) == -1)) {
clean_up("cannot open file");
return; /* NOT REACHED */
}