From df8ebf4c4a153005ea56888d82e05288c597b4dc Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Wed, 11 Nov 2015 01:12:11 +0000 Subject: creat() -> open equiv; from Frederic Nowak --- games/hack/hack.bones.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'games/hack/hack.bones.c') 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); } -- cgit v1.2.3