summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--buffered-reader/src/file_unix.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/buffered-reader/src/file_unix.rs b/buffered-reader/src/file_unix.rs
index 5f6ebb75..69065296 100644
--- a/buffered-reader/src/file_unix.rs
+++ b/buffered-reader/src/file_unix.rs
@@ -134,7 +134,7 @@ impl<'a, C> File<'a, C> {
mmap(ptr::null_mut(), length, PROT_READ, MAP_PRIVATE,
fd, 0)
};
- if addr.is_null() {
+ if addr == libc::MAP_FAILED {
return generic(file, cookie);
}