diff options
author | Thierry Vignaud <tv@mageia.org> | 2012-06-13 18:44:39 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2012-06-13 18:44:39 +0000 |
commit | 6febfa30422a3563a225955a2e0bd9e585ca5576 (patch) | |
tree | 7a8092b60c224aa89b8b86e40724432c29cf04e0 | |
parent | a1aad20c69870db5718de6f2b6dc0beec78cf3ae (diff) | |
download | perl-URPM-6febfa30422a3563a225955a2e0bd9e585ca5576.tar perl-URPM-6febfa30422a3563a225955a2e0bd9e585ca5576.tar.gz perl-URPM-6febfa30422a3563a225955a2e0bd9e585ca5576.tar.bz2 perl-URPM-6febfa30422a3563a225955a2e0bd9e585ca5576.tar.xz perl-URPM-6febfa30422a3563a225955a2e0bd9e585ca5576.zip |
(return_list_tag_modifier) use proper accessors
-rw-r--r-- | URPM.xs | 30 |
1 files changed, 17 insertions, 13 deletions
@@ -523,24 +523,28 @@ return_list_tag_modifier(const Header header, rpmTag tag_name) { if (!headerGet(header, tag_name, &td, HEADERGET_DEFAULT)) return; int count = rpmtdCount(&td); - int32_t *list = td.data; + rpmtdInit(&td); for (i = 0; i < count; i++) { char buff[15]; char *s = buff; + int32_t tag; + rpmtdNext(&td); + tag = rpmtdGetNumber(&td); + if (tag_name == RPMTAG_FILEFLAGS) { - if (list[i] & RPMFILE_CONFIG) *s++ = 'c'; - if (list[i] & RPMFILE_DOC) *s++ = 'd'; - if (list[i] & RPMFILE_GHOST) *s++ = 'g'; - if (list[i] & RPMFILE_LICENSE) *s++ = 'l'; - if (list[i] & RPMFILE_MISSINGOK) *s++ = 'm'; - if (list[i] & RPMFILE_NOREPLACE) *s++ = 'n'; - if (list[i] & RPMFILE_SPECFILE) *s++ = 'S'; - if (list[i] & RPMFILE_README) *s++ = 'R'; - if (list[i] & RPMFILE_EXCLUDE) *s++ = 'e'; - if (list[i] & RPMFILE_ICON) *s++ = 'i'; - if (list[i] & RPMFILE_UNPATCHED) *s++ = 'u'; - if (list[i] & RPMFILE_PUBKEY) *s++ = 'p'; + if (tag & RPMFILE_CONFIG) *s++ = 'c'; + if (tag & RPMFILE_DOC) *s++ = 'd'; + if (tag & RPMFILE_GHOST) *s++ = 'g'; + if (tag & RPMFILE_LICENSE) *s++ = 'l'; + if (tag & RPMFILE_MISSINGOK) *s++ = 'm'; + if (tag & RPMFILE_NOREPLACE) *s++ = 'n'; + if (tag & RPMFILE_SPECFILE) *s++ = 'S'; + if (tag & RPMFILE_README) *s++ = 'R'; + if (tag & RPMFILE_EXCLUDE) *s++ = 'e'; + if (tag & RPMFILE_ICON) *s++ = 'i'; + if (tag & RPMFILE_UNPATCHED) *s++ = 'u'; + if (tag & RPMFILE_PUBKEY) *s++ = 'p'; } else { rpmtdFreeData(&td); return; |