mirror of
https://github.com/libvirt/libvirt.git
synced 2026-09-03 20:53:04 -05:00
util/virhash: add name parameter to virHashSearch
While searching for an element using a function it may be desirable to know the element key for future operation. Signed-off-by: Pavel Hrdina <phrdina@redhat.com> Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
+1
-1
@@ -436,7 +436,7 @@ testHashSearch(const void *data ATTRIBUTE_UNUSED)
|
||||
if (!(hash = testHashInit(0)))
|
||||
return -1;
|
||||
|
||||
entry = virHashSearch(hash, testHashSearchIter, NULL);
|
||||
entry = virHashSearch(hash, testHashSearchIter, NULL, NULL);
|
||||
|
||||
if (!entry || STRNEQ(uuids_subset[testSearchIndex], entry)) {
|
||||
VIR_TEST_VERBOSE("\nvirHashSearch didn't find entry '%s'\n",
|
||||
|
||||
Reference in New Issue
Block a user