summaryrefslogtreecommitdiff
path: root/games/hack/hack.bones.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2015-11-11 01:12:11 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2015-11-11 01:12:11 +0000
commitdf8ebf4c4a153005ea56888d82e05288c597b4dc (patch)
treec0eb870a47c4f73e3880ed05eb2ca1d61294ea89 /games/hack/hack.bones.c
parent4a35cd787d4211704bc33e641f746562a95af113 (diff)
creat() -> open equiv; from Frederic Nowak
Diffstat (limited to 'games/hack/hack.bones.c')
-rw-r--r--games/hack/hack.bones.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/games/hack/hack.bones.c b/games/hack/hack.bones.c
index 6cd76829f1b..9c93b813ab7 100644
--- a/games/hack/hack.bones.c
+++ b/games/hack/hack.bones.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hack.bones.c,v 1.8 2009/10/27 23:59:25 deraadt Exp $ */
+/* $OpenBSD: hack.bones.c,v 1.9 2015/11/11 01:12:10 deraadt Exp $ */
/*
* Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
@@ -129,7 +129,7 @@ savebones()
otmp->cursed = 1; /* flag as gotten from a ghost */
}
}
- if((fd = creat(bones, FMASK)) < 0) return;
+ if((fd = open(bones, O_CREAT | O_TRUNC | O_WRONLY, FMASK)) < 0) return;
savelev(fd,dlevel);
(void) close(fd);
}