summaryrefslogtreecommitdiff
path: root/src/apk_adb.c
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2020-11-27 17:23:33 +0200
committerTimo Teräs <timo.teras@iki.fi>2021-05-26 12:47:48 +0300
commit209201bc5d400b68d71af0830efe9085c3648665 (patch)
tree6477d1fa9b523afc47f37b3b0660281806b41604 /src/apk_adb.c
parent7167bc9e7b67be4b067dfc266872a7ea996bf58a (diff)
downloadapk-tools-209201bc5d400b68d71af0830efe9085c3648665.tar.gz
apk-tools-209201bc5d400b68d71af0830efe9085c3648665.tar.bz2
apk-tools-209201bc5d400b68d71af0830efe9085c3648665.tar.xz
apk-tools-209201bc5d400b68d71af0830efe9085c3648665.zip
add abstraction to adb "walking" - a sax like API to enumerate whole db
This converts 'adbdump' applet to generate adb_walk api callbacks, and implement gentext backend to generate the yaml-like text output.
Diffstat (limited to 'src/apk_adb.c')
-rw-r--r--src/apk_adb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/apk_adb.c b/src/apk_adb.c
index 2827733..0e08848 100644
--- a/src/apk_adb.c
+++ b/src/apk_adb.c
@@ -160,7 +160,7 @@ static adb_val_t int_fromstring(struct adb *db, apk_blob_t val)
{
uint32_t n = apk_blob_pull_uint(&val, 10);
if (val.len) return ADB_ERROR(EINVAL);
- return adb_w_int(db, n);
+ return adb_w_int(db, n) ?: ADB_VAL_NULL;
}
static int int_compare(struct adb *db1, adb_val_t v1, struct adb *db2, adb_val_t v2)