aboutsummaryrefslogtreecommitdiffstats
path: root/rpm5compat.h
diff options
context:
space:
mode:
Diffstat (limited to 'rpm5compat.h')
-rw-r--r--rpm5compat.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/rpm5compat.h b/rpm5compat.h
index e3624bd..bf2c927 100644
--- a/rpm5compat.h
+++ b/rpm5compat.h
@@ -142,9 +142,13 @@ static inline Header headerRead(void * _fd, enum hMagic magicp) {
Header h = NULL;
const char * msg = NULL;
rpmRC rc = rpmpkgRead(item, _fd, &h, &msg);
- if (rc != RPMRC_OK) {
- rpmlog(RPMLOG_ERR, "%s: %s: %s\n", "headerRead", item, msg);
- rc = RPMRC_FAIL;
+ switch (rc) {
+ default:
+ rpmlog(RPMLOG_ERR, "%s: %s: %s\n", "headerRead", item, msg);
+ case RPMRC_NOTFOUND:
+ h = NULL;
+ case RPMRC_OK:
+ break;
}
msg = _free(msg);
return h;