summaryrefslogtreecommitdiffstats
path: root/fastbootd/transport.c
diff options
context:
space:
mode:
Diffstat (limited to 'fastbootd/transport.c')
-rw-r--r--fastbootd/transport.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fastbootd/transport.c b/fastbootd/transport.c
index ce8f9d0..9a16fd7 100644
--- a/fastbootd/transport.c
+++ b/fastbootd/transport.c
@@ -55,7 +55,7 @@ int transport_handle_download(struct transport_handle *thandle, size_t len)
ftruncate(fd, len);
buffer = mmap(NULL, len, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
- if (buffer == NULL) {
+ if (buffer == MAP_FAILED) {
D(ERR, "mmap(%zu) failed: %d %s", len, errno, strerror(errno));
goto err;
}