summaryrefslogtreecommitdiff
path: root/src/database.c
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2015-04-13 09:41:49 +0300
committerTimo Teräs <timo.teras@iki.fi>2015-04-13 09:42:27 +0300
commit3490ff789a9375d3047c6580f24a55157ebef4f0 (patch)
treea07390ce63f550a0f8e8f0736df5079354ee6602 /src/database.c
parent43955329325c823579ded743efb324cc8ea1daba (diff)
downloadapk-tools-3490ff789a9375d3047c6580f24a55157ebef4f0.tar.gz
apk-tools-3490ff789a9375d3047c6580f24a55157ebef4f0.tar.bz2
apk-tools-3490ff789a9375d3047c6580f24a55157ebef4f0.tar.xz
apk-tools-3490ff789a9375d3047c6580f24a55157ebef4f0.zip
fix tee io error handling
use ERR_PTR mechanism, and handle it at all places.
Diffstat (limited to 'src/database.c')
-rw-r--r--src/database.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/database.c b/src/database.c
index b71c9df..364b4df 100644
--- a/src/database.c
+++ b/src/database.c
@@ -2586,7 +2586,7 @@ static int apk_db_unpack_pkg(struct apk_database *db,
apk_blob_push_blob(&b, tmpprefix);
apk_pkg_format_cache_pkg(b, pkg);
cache_bs = apk_bstream_tee(bs, db->cache_fd, tmpcacheitem, NULL, NULL);
- if (cache_bs != NULL)
+ if (!IS_ERR_OR_NULL(cache_bs))
bs = cache_bs;
else
apk_warning(PKG_VER_FMT": unable to cache: %s",