use symbolic constant for open(), PR#5867
This commit is contained in:
parent
9a9bb90e33
commit
923fd93941
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: dumpgame.c,v 1.5 1997/10/12 21:24:42 christos Exp $ */
|
/* $NetBSD: dumpgame.c,v 1.6 1998/09/11 14:26:19 hubertf Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1980, 1993
|
* Copyright (c) 1980, 1993
|
||||||
@ -38,7 +38,7 @@
|
|||||||
#if 0
|
#if 0
|
||||||
static char sccsid[] = "@(#)dumpgame.c 8.1 (Berkeley) 5/31/93";
|
static char sccsid[] = "@(#)dumpgame.c 8.1 (Berkeley) 5/31/93";
|
||||||
#else
|
#else
|
||||||
__RCSID("$NetBSD: dumpgame.c,v 1.5 1997/10/12 21:24:42 christos Exp $");
|
__RCSID("$NetBSD: dumpgame.c,v 1.6 1998/09/11 14:26:19 hubertf Exp $");
|
||||||
#endif
|
#endif
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
@ -130,7 +130,7 @@ restartgame()
|
|||||||
int fd;
|
int fd;
|
||||||
int version;
|
int version;
|
||||||
|
|
||||||
if ((fd = open("trek.dump", 0)) < 0 ||
|
if ((fd = open("trek.dump", O_RDONLY)) < 0 ||
|
||||||
read(fd, &version, sizeof version) != sizeof version ||
|
read(fd, &version, sizeof version) != sizeof version ||
|
||||||
version != VERSION ||
|
version != VERSION ||
|
||||||
readdump(fd))
|
readdump(fd))
|
||||||
|
Loading…
Reference in New Issue
Block a user