summaryrefslogtreecommitdiff
path: root/src/package.c
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2021-07-17 15:43:08 +0300
committerTimo Teräs <timo.teras@iki.fi>2021-07-22 15:30:08 +0300
commitb559a81694d8a95ac786104516aebf98d04b84bc (patch)
tree2bd4601015e0d7202c3eb685bf79756022d11b06 /src/package.c
parent94c5e01038a819e8abd062ed81aec321cdff4aa3 (diff)
downloadapk-tools-b559a81694d8a95ac786104516aebf98d04b84bc.tar.gz
apk-tools-b559a81694d8a95ac786104516aebf98d04b84bc.tar.bz2
apk-tools-b559a81694d8a95ac786104516aebf98d04b84bc.tar.xz
apk-tools-b559a81694d8a95ac786104516aebf98d04b84bc.zip
io: rework apk_istream_get_* to not return erros in blob value
The interface was slightly cumbersome, so replace these functions to return explicit error, and make the return blob a pointer arg.
Diffstat (limited to 'src/package.c')
-rw-r--r--src/package.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/package.c b/src/package.c
index 89965ab..542edfd 100644
--- a/src/package.c
+++ b/src/package.c
@@ -643,7 +643,7 @@ int apk_sign_ctx_verify_tar(void *sctx, const struct apk_file_info *fi,
if (strcmp(fi->name, ".PKGINFO") == 0) {
apk_blob_t l, token = APK_BLOB_STR("\n");
- while (!APK_BLOB_IS_NULL(l = apk_istream_get_delim(is, token)))
+ while (apk_istream_get_delim(is, token, &l) == 0)
apk_sign_ctx_parse_pkginfo_line(ctx, l);
}
@@ -900,7 +900,7 @@ static int read_info_entry(void *ctx, const struct apk_file_info *ae,
if (strcmp(ae->name, ".PKGINFO") == 0) {
/* APK 2.0 format */
apk_blob_t l, token = APK_BLOB_STR("\n");
- while (!APK_BLOB_IS_NULL(l = apk_istream_get_delim(is, token)))
+ while (apk_istream_get_delim(is, token, &l) == 0)
read_info_line(ctx, l);
} else if (strcmp(ae->name, ".INSTALL") == 0) {
apk_warn(&ri->db->ctx->out,