summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2011-11-30 09:50:03 +0200
committerPanu Matilainen <pmatilai@redhat.com>2011-11-30 11:03:54 +0200
commiteae671556470136c37951f53ca966cd1bd09aac4 (patch)
treed2c0840c58eedabae9070a26b62828d7cba416ea /lib
parent359baa2831dd1850cba3a1cc8d31aebf883a5138 (diff)
downloadlibrpm-tizen-eae671556470136c37951f53ca966cd1bd09aac4.tar.gz
librpm-tizen-eae671556470136c37951f53ca966cd1bd09aac4.tar.bz2
librpm-tizen-eae671556470136c37951f53ca966cd1bd09aac4.zip
Update internal callers to use headerExport(), no functional changes
Diffstat (limited to 'lib')
-rw-r--r--lib/rpmdb.c6
-rw-r--r--lib/rpmts.c4
2 files changed, 4 insertions, 6 deletions
diff --git a/lib/rpmdb.c b/lib/rpmdb.c
index 6b0272a1b..0a8774129 100644
--- a/lib/rpmdb.c
+++ b/lib/rpmdb.c
@@ -1257,8 +1257,7 @@ static int miFreeHeader(rpmdbMatchIterator mi, dbiIndex dbi)
memset(&data, 0, sizeof(data));
key.data = (void *) &mi->mi_prevoffset;
key.size = sizeof(mi->mi_prevoffset);
- data.data = headerUnload(mi->mi_h);
- data.size = headerSizeof(mi->mi_h, HEADER_MAGIC_NO);
+ data.data = headerExport(mi->mi_h, &data.size);
/* Check header digest/signature on blob export (if requested). */
if (mi->mi_hdrchk && mi->mi_ts) {
@@ -2652,8 +2651,7 @@ int rpmdbAdd(rpmdb db, Header h)
memset(&hdr, 0, sizeof(hdr));
- hdr.size = headerSizeof(h, HEADER_MAGIC_NO);
- hdr.data = headerUnload(h);
+ hdr.data = headerExport(h, &hdr.size);
hdrOk = (hdr.data != NULL && hdr.size > 0);
if (!hdrOk) {
diff --git a/lib/rpmts.c b/lib/rpmts.c
index 111879b1d..25ce83da7 100644
--- a/lib/rpmts.c
+++ b/lib/rpmts.c
@@ -423,8 +423,8 @@ static int makePubkeyHeader(rpmts ts, rpmPubkey key, Header * hdrp)
h = headerReload(h, RPMTAG_HEADERIMMUTABLE);
if (h != NULL) {
char *sha1 = NULL;
- const void *blob = headerUnload(h);
- size_t blen = headerSizeof(h, HEADER_MAGIC_NO);
+ unsigned int blen = 0;
+ const void *blob = headerExport(h, &blen);
/* XXX FIXME: bah, this code is repeated in way too many places */
DIGEST_CTX ctx = rpmDigestInit(PGPHASHALGO_SHA1, RPMDIGEST_NONE);