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 | |
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
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | URPM.xs | 7 |
2 files changed, 4 insertions, 4 deletions
@@ -1,4 +1,5 @@ - fix a very old segfault in unused code +- internal cleanups - reduce code size Version 4.2 - 13 June 2012 @@ -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]]); |