From 1315d9f498a38916a128ef95d3bbd7557fc1ebc3 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Mon, 26 May 2008 15:16:39 +0300 Subject: Convert processPackageFiles() to new headerGet() interface --- build/files.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'build') diff --git a/build/files.c b/build/files.c index 3c997eebc..47ad2893a 100644 --- a/build/files.c +++ b/build/files.c @@ -1676,7 +1676,6 @@ exit: static rpmRC processPackageFiles(rpmSpec spec, Package pkg, int installSpecialDoc, int test) { - HGE_t hge = (HGE_t)headerGetEntryMinMemory; struct FileList_s fl; char *s, **fp; ARGV_t files = NULL; @@ -1728,10 +1727,12 @@ static rpmRC processPackageFiles(rpmSpec spec, Package pkg, /* XXX spec->buildRoot == NULL, then xstrdup("") is returned */ fl.buildRoot = rpmGenPath(spec->rootDir, spec->buildRoot, NULL); - if (hge(pkg->header, RPMTAG_DEFAULTPREFIX, NULL, (rpm_data_t *)&fl.prefix, NULL)) - fl.prefix = xstrdup(fl.prefix); - else - fl.prefix = NULL; + { struct rpmtd_s td; + const char *prefix; + headerGet(pkg->header, RPMTAG_DEFAULTPREFIX, &td, HEADERGET_MINMEM); + prefix = rpmtdGetString(&td); + fl.prefix = prefix ? xstrdup(prefix) : NULL; + } fl.fileCount = 0; fl.totalFileSize = 0; -- cgit v1.2.3