fix bstream_from_fd to use mmap when available

cute-signatures
Timo Teräs 2015-06-12 09:56:39 +03:00
parent f08fee9528
commit 6b140ec5c7
1 changed files with 2 additions and 1 deletions

View File

@ -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));