projects
/
platform
/
upstream
/
rpm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
087c995
)
Fix the non-keyed match iteration case wrt DB_NOTFOUND
author
Panu Matilainen
<pmatilai@redhat.com>
Thu, 9 Jun 2011 09:45:42 +0000
(12:45 +0300)
committer
Panu Matilainen
<pmatilai@redhat.com>
Thu, 9 Jun 2011 09:45:42 +0000
(12:45 +0300)
- This broke in commit
7e4415fcc5e11cfd4cd9d0dfe19568be73f15d74
,
the cases are not identical afterall: With non-keyed cursor
retrievals DB_NOTFOUND is returned when there's nothing more to
get, this is not an error situation.
lib/rpmdb.c
patch
|
blob
|
history
diff --git
a/lib/rpmdb.c
b/lib/rpmdb.c
index
613b8a4
..
e89fef9
100644
(file)
--- a/
lib/rpmdb.c
+++ b/
lib/rpmdb.c
@@
-1989,6
+1989,10
@@
rpmdbMatchIterator rpmdbInitIterator(rpmdb db, rpmDbiTagVal rpmtag,
rc = dbiCursorGetToSet(dbc, NULL, 0, &set);
} while (rc == 0);
+ /* If we got some results, not found is not an error */
+ if (rc == DB_NOTFOUND && set != NULL)
+ rc = 0;
+
dbiCursorFree(dbc);
}