summaryrefslogtreecommitdiff
path: root/src/fetch.c
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2015-03-10 13:04:14 +0200
committerTimo Teräs <timo.teras@iki.fi>2015-03-10 13:15:31 +0200
commit2a6896b2b4809849441756046ee7d8ad34abab34 (patch)
treee42c99fc0a6bb2fa35fcce241776d9208a8c0471 /src/fetch.c
parent417755cb2e16dee1cb674cbe2b2942c156e0b5da (diff)
downloadapk-tools-2a6896b2b4809849441756046ee7d8ad34abab34.tar.gz
apk-tools-2a6896b2b4809849441756046ee7d8ad34abab34.tar.bz2
apk-tools-2a6896b2b4809849441756046ee7d8ad34abab34.tar.xz
apk-tools-2a6896b2b4809849441756046ee7d8ad34abab34.zip
rework error handling for read streams
Diffstat (limited to 'src/fetch.c')
-rw-r--r--src/fetch.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/fetch.c b/src/fetch.c
index 7caf9d4..dc4571b 100644
--- a/src/fetch.c
+++ b/src/fetch.c
@@ -169,8 +169,8 @@ static int fetch_package(apk_hash_item item, void *pctx)
}
is = apk_istream_from_fd_url(urlfd, url);
- if (is == NULL) {
- r = -EIO;
+ if (IS_ERR_OR_NULL(is)) {
+ r = PTR_ERR(is) ?: -EIO;
goto err;
}