summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/io.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/io.c b/src/io.c
index 136153c..a62ef36 100644
--- a/src/io.c
+++ b/src/io.c
@@ -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));