aboutsummaryrefslogtreecommitdiff
path: root/libexec/ftpd
diff options
context:
space:
mode:
authorAlexander Langer <alex@FreeBSD.org>1997-01-16 21:58:40 +0000
committerAlexander Langer <alex@FreeBSD.org>1997-01-16 21:58:40 +0000
commit8abdc2eb40c03b97153f2a01bdb53927f3a336c1 (patch)
treed61898dd79824c10ca33127214d8569c804559c2 /libexec/ftpd
parent839cc09e5384e6f8c0ebb9203052015b532cfce7 (diff)
Notes
Diffstat (limited to 'libexec/ftpd')
-rw-r--r--libexec/ftpd/ftpd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c
index ebe7dd38b5ec..71565cf1c4d3 100644
--- a/libexec/ftpd/ftpd.c
+++ b/libexec/ftpd/ftpd.c
@@ -1189,7 +1189,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;