aboutsummaryrefslogtreecommitdiffstats
path: root/URPM.xs
diff options
context:
space:
mode:
Diffstat (limited to 'URPM.xs')
-rw-r--r--URPM.xs7
1 files changed, 4 insertions, 3 deletions
diff --git a/URPM.xs b/URPM.xs
index 7536b2a..a0e5210 100644
--- a/URPM.xs
+++ b/URPM.xs
@@ -574,7 +574,7 @@ return_list_str(char *s, Header header, rpmTag tag_name, rpmTag tag_flags, rpmTa
const char **list = he->p.argv;
rpmsenseFlags *flags = NULL;
const char **list_evr = NULL;
- int count = he->c;
+ int c = he->c;
if (tag_flags) {
he->tag = tag_flags;
@@ -586,14 +586,15 @@ return_list_str(char *s, Header header, rpmTag tag_name, rpmTag tag_flags, rpmTa
if (headerGet(header, he, 0))
list_evr = he->p.argv;
}
- for (he->ix = 0; he->ix < count; he->ix++) {
+ for (he->ix = 0; he->ix < c; he->ix++) {
+ ++count;
if (f(NULL, 0, list[he->ix], flags ? flags[he->ix] : 0,
list_evr ? list_evr[he->ix] : NULL,
param)) {
list = _free(list);
if (tag_flags) flags = _free(flags);
if (tag_version) list_evr = _free(list_evr);
- return -he->ix;
+ return (int)-count;
}
}
list = _free(list);