]> xenbits.xensource.com Git - libvirt.git/commit
util: Add a return value to void hash iterators
authorErik Skultety <eskultet@redhat.com>
Fri, 12 Feb 2016 09:03:50 +0000 (10:03 +0100)
committerErik Skultety <eskultet@redhat.com>
Wed, 17 Feb 2016 11:46:34 +0000 (12:46 +0100)
commitcc48d3a12244a2bd7fc09512a83afbb57e4cb153
treea54c40bb133d90ab5cfc73cb83249d1e8799d274
parentd1242ba24a5ceb74c7ba21c6b2a44aaa1745fe79
util: Add a return value to void hash iterators

Our existing virHashForEach method iterates through all items disregarding the
fact, that some of the iterators might have actually failed. Errors are usually
dispatched through an error element in opaque data which then causes the
original caller of virHashForEach to return -1. In that case, virHashForEach
could return as soon as one of the iterators fail. This patch changes the
iterator return type and adjusts all of its instances accordingly, so the
actual refactor of virHashForEach method can be dealt with later.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
18 files changed:
src/conf/network_conf.c
src/conf/nwfilter_params.c
src/conf/snapshot_conf.c
src/conf/virchrdev.c
src/conf/virdomainobjlist.c
src/locking/lock_daemon.c
src/nwfilter/nwfilter_dhcpsnoop.c
src/nwfilter/nwfilter_gentech_driver.c
src/qemu/qemu_domain.c
src/qemu/qemu_domain.h
src/qemu/qemu_driver.c
src/test/test_driver.c
src/uml/uml_driver.c
src/util/virclosecallbacks.c
src/util/virhash.c
src/util/virhash.h
src/xen/xm_internal.c
tests/virhashtest.c