diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2001-05-11 15:34:03 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2001-05-11 15:34:03 +0000 |
commit | d9ca52668297da80e47ff48f9f0331303c6492b6 (patch) | |
tree | 5ab3b5ca23af4fd7fd7c7c090d817587d43f7512 /libexec/ftpd | |
parent | bc779d87e0b1eb1792440d7f6f530968da5b046d (diff) |
mmap returns MAP_FAILED on error, not 0.
Diffstat (limited to 'libexec/ftpd')
-rw-r--r-- | libexec/ftpd/ftpd.c | 4 |
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; |