diff options
author | Per Øyvind Karlsen <peroyvind@mandriva.org> | 2008-02-29 14:29:41 +0000 |
---|---|---|
committer | Per Øyvind Karlsen <peroyvind@mandriva.org> | 2008-02-29 14:29:41 +0000 |
commit | 4b03c52821c38cace41847d4a6754ceceb35fa7f (patch) | |
tree | f56d064f829fcf8d3782429561c1a781b7c35370 /rpm5compat.h | |
parent | e0f45d83900b41301a3b949604fb766ee15986e8 (diff) | |
download | perl-URPM-4b03c52821c38cace41847d4a6754ceceb35fa7f.tar perl-URPM-4b03c52821c38cace41847d4a6754ceceb35fa7f.tar.gz perl-URPM-4b03c52821c38cace41847d4a6754ceceb35fa7f.tar.bz2 perl-URPM-4b03c52821c38cace41847d4a6754ceceb35fa7f.tar.xz perl-URPM-4b03c52821c38cace41847d4a6754ceceb35fa7f.zip |
be sure to set return value to NULL in headerGetEntry when Epoch isn't set
Diffstat (limited to 'rpm5compat.h')
-rw-r--r-- | rpm5compat.h | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/rpm5compat.h b/rpm5compat.h index 4dc06c5..2a49264 100644 --- a/rpm5compat.h +++ b/rpm5compat.h @@ -22,14 +22,15 @@ enum hMagic { }; -typedef uint32_t * hTAG_t; -typedef uint32_t * hTYP_t; -typedef const void * hPTR_t; -typedef uint32_t * hCNT_t; -typedef uint32_t int_32; -typedef uint16_t uint_16; -typedef uint8_t byte; -typedef union hRET_s { +typedef uint32_t * hTAG_t; +typedef uint32_t * hTYP_t; +typedef const void * hPTR_t; +typedef uint32_t * hCNT_t; +typedef uint32_t int_32; +typedef uint16_t uint_16; +typedef uint8_t byte; + +typedef union hRET_s { const void * ptr; const char ** argv; const char * str; @@ -44,6 +45,7 @@ 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; he->tag = tag; rc = headerGet(h, he, tag); if (rc) { |