diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2010-03-25 12:34:06 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2010-03-25 12:34:06 +0200 |
commit | 833ea26c4660889a614e0808b7b1e725d255aa7e (patch) | |
tree | e50e841e4a109b6c1a1332653a2b961a0c0e9677 /lib/rpmps.c | |
parent | ab890ee23f17836daacda810378207fce84753b9 (diff) | |
download | rpm-833ea26c4660889a614e0808b7b1e725d255aa7e.tar.gz rpm-833ea26c4660889a614e0808b7b1e725d255aa7e.tar.bz2 rpm-833ea26c4660889a614e0808b7b1e725d255aa7e.zip |
Dont bother allocating iterator if there's no data to iterate
Diffstat (limited to 'lib/rpmps.c')
-rw-r--r-- | lib/rpmps.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rpmps.c b/lib/rpmps.c index c19c4901f..cf2275de5 100644 --- a/lib/rpmps.c +++ b/lib/rpmps.c @@ -67,7 +67,7 @@ int rpmpsNumProblems(rpmps ps) rpmpsi rpmpsInitIterator(rpmps ps) { rpmpsi psi = NULL; - if (ps != NULL) { + if (ps != NULL && ps->numProblems > 0) { psi = xcalloc(1, sizeof(*psi)); psi->ps = rpmpsLink(ps); psi->ix = -1; |