summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorFederico G. Schwindt <fgsch@cvs.openbsd.org>2003-05-17 00:10:53 +0000
committerFederico G. Schwindt <fgsch@cvs.openbsd.org>2003-05-17 00:10:53 +0000
commite1e238ce2710b29ed3e611a4e3405c253e4e63f3 (patch)
tree9bc3c6d52d2994c2473f80f5c7b001d6c290bb5a /bin
parent739b132fd60066571eaa26e6f9aa964b3b92e889 (diff)
use MAP_FAILED rather than -1; millert@ ok.
Diffstat (limited to 'bin')
-rw-r--r--bin/ksh/history.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/ksh/history.c b/bin/ksh/history.c
index 3d9aecb02e0..3bac162b906 100644
--- a/bin/ksh/history.c
+++ b/bin/ksh/history.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: history.c,v 1.20 2003/05/16 19:58:57 jsyn Exp $ */
+/* $OpenBSD: history.c,v 1.21 2003/05/17 00:10:52 fgsch Exp $ */
/*
* command history
@@ -862,7 +862,7 @@ hist_init(s)
* check on its validity
*/
if (base == MAP_FAILED || *base != HMAGIC1 || base[1] != HMAGIC2) {
- if (base != (unsigned char *)-1)
+ if (base != MAP_FAILED)
munmap((caddr_t)base, hsize);
hist_finish();
unlink(hname);