aboutsummaryrefslogtreecommitdiffstats
path: root/rpm5compat.h
diff options
context:
space:
mode:
authorPer Øyvind Karlsen <peroyvind@mandriva.org>2008-02-29 18:45:39 +0000
committerPer Øyvind Karlsen <peroyvind@mandriva.org>2008-02-29 18:45:39 +0000
commitd6f9d44d9224677ee32050567481644c73b7c17d (patch)
tree9a97f2e707731feedf6df0d3b644d3835893d87b /rpm5compat.h
parentfc84d46d7103845951da10f0545e368915ff4579 (diff)
downloadperl-URPM-d6f9d44d9224677ee32050567481644c73b7c17d.tar
perl-URPM-d6f9d44d9224677ee32050567481644c73b7c17d.tar.gz
perl-URPM-d6f9d44d9224677ee32050567481644c73b7c17d.tar.bz2
perl-URPM-d6f9d44d9224677ee32050567481644c73b7c17d.tar.xz
perl-URPM-d6f9d44d9224677ee32050567481644c73b7c17d.zip
be sure to always initialize in headerGetEntry
Diffstat (limited to 'rpm5compat.h')
-rw-r--r--rpm5compat.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/rpm5compat.h b/rpm5compat.h
index 5c2da10..860cc8d 100644
--- a/rpm5compat.h
+++ b/rpm5compat.h
@@ -58,7 +58,8 @@ static inline int headerGetEntry(Header h, int_32 tag, hTYP_t type, void ** p, h
HE_t he = memset(alloca(sizeof(*he)), 0, sizeof(*he));
int rc;
- if (tag == RPMTAG_EPOCH) *(void **)p = NULL;
+ /* Always ensure to initialize */
+ *(void **)p = NULL;
he->tag = tag;
rc = headerGet(h, he, tag);
if (rc) {
@@ -66,6 +67,7 @@ static inline int headerGetEntry(Header h, int_32 tag, hTYP_t type, void ** p, h
if (p) *(void **) p = he->p.ptr;
if (c) *c = he->c;
}
+
return rc;
}