diff options
author | Timo Teräs <timo.teras@iki.fi> | 2015-06-12 09:56:39 +0300 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2015-06-12 09:57:52 +0300 |
commit | 6b140ec5c719175393101d5f723371303e09426e (patch) | |
tree | 4f2094c7c0b836555f36486825fb2d5ec3b58763 /src/io.c | |
parent | f08fee95281c56f393bd9822c5daaa9cdc2b6b06 (diff) | |
download | apk-tools-6b140ec5c719175393101d5f723371303e09426e.tar.gz apk-tools-6b140ec5c719175393101d5f723371303e09426e.tar.bz2 apk-tools-6b140ec5c719175393101d5f723371303e09426e.tar.xz apk-tools-6b140ec5c719175393101d5f723371303e09426e.zip |
fix bstream_from_fd to use mmap when available
Diffstat (limited to 'src/io.c')
-rw-r--r-- | src/io.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -365,7 +365,8 @@ struct apk_bstream *apk_bstream_from_fd_pid(int fd, pid_t pid, int (*translate_s if (pid == 0) { bs = apk_mmap_bstream_from_fd(fd); - if (IS_ERR_OR_NULL(bs)) return ERR_CAST(bs); + if (!IS_ERR_OR_NULL(bs)) + return bs; } return apk_bstream_from_istream(apk_istream_from_fd_pid(fd, pid, translate_status)); |