diff options
author | dholland <dholland@NetBSD.org> | 2008-01-28 06:55:41 +0000 |
---|---|---|
committer | dholland <dholland@NetBSD.org> | 2008-01-28 06:55:41 +0000 |
commit | dfce1cca7e9f2a93d3246b5dba2113e20cbc447a (patch) | |
tree | 44b17315ece5b2f5ce5ec3ebea7e212a0525e0c3 /hack/hack.lev.c | |
parent | e0675e304b50073e40bf7b5d3bfc9ef7d7358ace (diff) | |
download | bsdgames-darwin-dfce1cca7e9f2a93d3246b5dba2113e20cbc447a.tar.gz bsdgames-darwin-dfce1cca7e9f2a93d3246b5dba2113e20cbc447a.tar.zst bsdgames-darwin-dfce1cca7e9f2a93d3246b5dba2113e20cbc447a.zip |
Make hack build with WARNS=4.
Diffstat (limited to 'hack/hack.lev.c')
-rw-r--r-- | hack/hack.lev.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/hack/hack.lev.c b/hack/hack.lev.c index c0cb3ef6..e65bfea6 100644 --- a/hack/hack.lev.c +++ b/hack/hack.lev.c @@ -1,4 +1,4 @@ -/* $NetBSD: hack.lev.c,v 1.6 2003/04/02 18:36:37 jsm Exp $ */ +/* $NetBSD: hack.lev.c,v 1.7 2008/01/28 06:55:41 dholland Exp $ */ /* * Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica, @@ -63,7 +63,7 @@ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: hack.lev.c,v 1.6 2003/04/02 18:36:37 jsm Exp $"); +__RCSID("$NetBSD: hack.lev.c,v 1.7 2008/01/28 06:55:41 dholland Exp $"); #endif /* not lint */ #include <stdlib.h> @@ -327,8 +327,8 @@ mread(fd, buf, len) { int rlen; - rlen = read(fd, buf, (int) len); - if (rlen != len) { + rlen = read(fd, buf, len); + if (rlen < 0 || (size_t)rlen != len) { pline("Read %d instead of %u bytes.\n", rlen, len); if (restoring) { (void) unlink(SAVEF); |