summaryrefslogtreecommitdiff
path: root/libexec/ftpd
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2001-05-11 15:34:03 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2001-05-11 15:34:03 +0000
commitd9ca52668297da80e47ff48f9f0331303c6492b6 (patch)
tree5ab3b5ca23af4fd7fd7c7c090d817587d43f7512 /libexec/ftpd
parentbc779d87e0b1eb1792440d7f6f530968da5b046d (diff)
mmap returns MAP_FAILED on error, not 0.
Diffstat (limited to 'libexec/ftpd')
-rw-r--r--libexec/ftpd/ftpd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c
index 95d370104a5..c282d1c5aa3 100644
--- a/libexec/ftpd/ftpd.c
+++ b/libexec/ftpd/ftpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ftpd.c,v 1.95 2001/03/18 17:20:13 deraadt Exp $ */
+/* $OpenBSD: ftpd.c,v 1.96 2001/05/11 15:34:02 art Exp $ */
/* $NetBSD: ftpd.c,v 1.15 1995/06/03 22:46:47 mycroft Exp $ */
/*
@@ -1508,7 +1508,7 @@ send_data(instr, outstr, blksize, filesize, isreg)
if (isreg && filesize < (off_t)16 * 1024 * 1024) {
buf = mmap(0, filesize, PROT_READ, MAP_SHARED, filefd,
(off_t)0);
- if (!buf) {
+ if (buf == MAP_FAILED) {
syslog(LOG_WARNING, "mmap(%lu): %m",
(unsigned long)filesize);
goto oldway;