aboutsummaryrefslogtreecommitdiffstats
path: root/src/package.c
diff options
context:
space:
mode:
authorTimo Teras <timo.teras@iki.fi>2009-07-14 09:33:32 +0300
committerTimo Teras <timo.teras@iki.fi>2009-07-14 09:33:47 +0300
commit4562f44f9bac793b8397fdf35491da5d7ef815fa (patch)
treeee3b623f6ba2324909abdef26d41aabce7a9d434 /src/package.c
parente69b81f5259f532d5f5ae9c0a0f9bbd81240fbaf (diff)
downloadaports-4562f44f9bac793b8397fdf35491da5d7ef815fa.tar.gz
aports-4562f44f9bac793b8397fdf35491da5d7ef815fa.tar.bz2
aports-4562f44f9bac793b8397fdf35491da5d7ef815fa.tar.xz
bstream: make tokenizable and load index using bstream
some fixes on index reading code too.
Diffstat (limited to 'src/package.c')
-rw-r--r--src/package.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/package.c b/src/package.c
index 30b09b1ac5..1b72f1c141 100644
--- a/src/package.c
+++ b/src/package.c
@@ -293,10 +293,10 @@ int apk_pkg_add_info(struct apk_database *db, struct apk_package *pkg,
apk_hexdump_parse(APK_BLOB_BUF(pkg->csum), value);
break;
case 'S':
- pkg->size = apk_blob_uint(value, 10);
+ pkg->size = apk_blob_parse_uint(&value, 10);
break;
case 'I':
- pkg->installed_size = apk_blob_uint(value, 10);
+ pkg->installed_size = apk_blob_parse_uint(&value, 10);
break;
default:
return -1;
@@ -325,7 +325,7 @@ static int read_info_line(void *ctx, apk_blob_t line)
if (line.ptr == NULL || line.len < 1 || line.ptr[0] == '#')
return 0;
- if (!apk_blob_splitstr(line, " = ", &l, &r))
+ if (!apk_blob_split(line, APK_BLOB_STR(" = "), &l, &r))
return 0;
for (i = 0; i < ARRAY_SIZE(fields); i++) {