diff options
Diffstat (limited to 'games/hack/hack.bones.c')
-rw-r--r-- | games/hack/hack.bones.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/games/hack/hack.bones.c b/games/hack/hack.bones.c index 9ce8d916a81..4abe525065d 100644 --- a/games/hack/hack.bones.c +++ b/games/hack/hack.bones.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hack.bones.c,v 1.10 2016/01/09 18:33:15 mestre Exp $ */ +/* $OpenBSD: hack.bones.c,v 1.11 2019/06/28 13:32:52 deraadt Exp $ */ /* * Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica, @@ -131,7 +131,7 @@ savebones(void) otmp->cursed = 1; /* flag as gotten from a ghost */ } } - if((fd = open(bones, O_CREAT | O_TRUNC | O_WRONLY, FMASK)) < 0) return; + if((fd = open(bones, O_CREAT | O_TRUNC | O_WRONLY, FMASK)) == -1) return; savelev(fd,dlevel); (void) close(fd); } @@ -144,7 +144,7 @@ getbones(void) if(rn2(3)) return(0); /* only once in three times do we find bones */ bones[6] = '0' + dlevel/10; bones[7] = '0' + dlevel%10; - if((fd = open(bones, O_RDONLY)) < 0) return(0); + if((fd = open(bones, O_RDONLY)) == -1) return(0); if((ok = uptodate(fd)) != 0){ getlev(fd, 0, dlevel); for(x = 0; x < COLNO; x++) for(y = 0; y < ROWNO; y++) @@ -154,7 +154,7 @@ getbones(void) #ifdef WIZARD if(!wizard) /* duvel!frans: don't remove bones while debugging */ #endif /* WiZARD */ - if(unlink(bones) < 0){ + if(unlink(bones) == -1){ pline("Cannot unlink %s .", bones); return(0); } |