summaryrefslogtreecommitdiff
path: root/lib/query.c
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2010-03-19 19:25:23 +0200
committerPanu Matilainen <pmatilai@redhat.com>2010-03-19 19:25:23 +0200
commit606ceca33302751af140d8d9ebca598a6a06a39b (patch)
tree76cb8449a0c6abd8ea05474de34a673e48232278 /lib/query.c
parentaf659c87ce93b3d1506d5fdf6bece4891758eea4 (diff)
downloadlibrpm-tizen-606ceca33302751af140d8d9ebca598a6a06a39b.tar.gz
librpm-tizen-606ceca33302751af140d8d9ebca598a6a06a39b.tar.bz2
librpm-tizen-606ceca33302751af140d8d9ebca598a6a06a39b.zip
Return headers from rpmgiNext() directly
Diffstat (limited to 'lib/query.c')
-rw-r--r--lib/query.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/query.c b/lib/query.c
index 9cf270847..8e296b517 100644
--- a/lib/query.c
+++ b/lib/query.c
@@ -270,15 +270,12 @@ static int rpmgiShowMatches(QVA_t qva, rpmts ts)
{
rpmgi gi = qva->qva_gi;
int ec = 0;
+ Header h;
- while (rpmgiNext(gi) == RPMRC_OK) {
- Header h;
+ while ((h = rpmgiNext(gi)) != NULL) {
int rc;
rpmdbCheckSignals();
- h = rpmgiHeader(gi);
- if (h == NULL) /* XXX perhaps stricter break instead? */
- continue;
if ((rc = qva->qva_showPackage(qva, ts, h)) != 0)
ec = rc;
}