diff options
author | Thierry Vignaud <tv@mageia.org> | 2012-06-14 18:23:56 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2012-06-14 18:23:56 +0000 |
commit | 3bed5a8577c9a5175fd2d10b5a5c217cddc90406 (patch) | |
tree | 7916ea9d4f7b18bfbc2c8c17503f19ad67466ad8 /URPM.xs | |
parent | 8415bd7e2e880231a78efecd1693e41d889960df (diff) | |
download | perl-URPM-3bed5a8577c9a5175fd2d10b5a5c217cddc90406.tar perl-URPM-3bed5a8577c9a5175fd2d10b5a5c217cddc90406.tar.gz perl-URPM-3bed5a8577c9a5175fd2d10b5a5c217cddc90406.tar.bz2 perl-URPM-3bed5a8577c9a5175fd2d10b5a5c217cddc90406.tar.xz perl-URPM-3bed5a8577c9a5175fd2d10b5a5c217cddc90406.zip |
(return_files) use proper accessors in the RPMTAG_OLDFILENAMES case
Diffstat (limited to 'URPM.xs')
-rw-r--r-- | URPM.xs | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -701,16 +701,15 @@ return_files(const Header header, int filter_mode) { int32_t *dirIndexes = td_dirIndexes.data; int is_oldfilenames = !baseNames || !dirNames || !dirIndexes; - char **list = NULL; if (is_oldfilenames) { if (!headerGet(header, RPMTAG_OLDFILENAMES, &td_list, HEADERGET_DEFAULT)) return; - list = td_list.data; + rpmtdInit(&td_list); } for(i = 0; i < rpmtdCount(&td_baseNames); i++) { - if (list) { - s = list[i]; + if (is_oldfilenames) { + s = rpmtdNextString(&td_list); len = strlen(s); } else { len = strlen(dirNames[dirIndexes[i]]); |