aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--rpm5compat.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/rpm5compat.h b/rpm5compat.h
index e4b349d..71b5869 100644
--- a/rpm5compat.h
+++ b/rpm5compat.h
@@ -80,7 +80,6 @@ static int headerNextIterator(HeaderIterator hi, hTAG_t tag, hTYP_t type, hPTR_t
HE_t he = memset(alloca(sizeof(*he)), 0, sizeof(*he));
he->tag = (rpmTag)tag;
- he->p.str = (char*)p;
return headerNext(hi, he, 0);
}
@@ -105,14 +104,12 @@ void * headerFreeData(const void * data, rpmTagType type) {
static int headerWrite(void * _fd, Header h, enum hMagic magicp) {
const char item[] = "Header";
+ const char * fn = NULL;
const char * msg = NULL;
rpmRC rc = rpmpkgWrite(item, _fd, h, &msg);
if (rc != RPMRC_OK) {
-/* rpmlog(RPMLOG_ERR, "%s: %s: %s\n", sigtarget, item,
- (msg && *msg ? msg : "write failed\n"));*/
- msg = _free(msg);
+ rpmlog(RPMLOG_ERR, "%s: %s: %s\n", fn, item, msg);
rc = RPMRC_FAIL;
-// goto exit;
}
msg = _free(msg);
return rc;
@@ -120,11 +117,12 @@ static int headerWrite(void * _fd, Header h, enum hMagic magicp) {
static int headerRead(void * _fd, enum hMagic magicp) {
const char item[] = "Header";
- Header nh = NULL;
+ Header h = NULL;
+ const char * fn = NULL;
const char * msg = NULL;
- rpmRC rc = rpmpkgRead(item, _fd, &nh, &msg);
+ rpmRC rc = rpmpkgRead(item, _fd, &h, &msg);
if (rc != RPMRC_OK) {
- msg = _free(msg);
+ rpmlog(RPMLOG_ERR, "%s: %s: %s\n", fn, item, msg);
rc = RPMRC_FAIL;
}
msg = _free(msg);