mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-08 22:15:21 +00:00
conf: fix inverted parameters in hash iterator callbacks
virHashTableForEach unhelpfully has payload/key args in its callback reversed compared to g_hash_table_foreach. When converting from one to the other the semantics change but you don't get a compile error Reviewed-by: Erik Skultety <eskultet@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
5e1da78967
commit
991639da96
@ -380,8 +380,8 @@ struct virNWFilterObjListData {
|
||||
|
||||
|
||||
static void
|
||||
virNWFilterObjListCount(void *payload,
|
||||
void *key G_GNUC_UNUSED,
|
||||
virNWFilterObjListCount(void *key G_GNUC_UNUSED,
|
||||
void *payload,
|
||||
void *opaque)
|
||||
{
|
||||
virNWFilterObj *obj = payload;
|
||||
@ -417,8 +417,8 @@ struct virNWFilterNameData {
|
||||
|
||||
|
||||
static void
|
||||
virNWFilterObjListCopyNames(void *payload,
|
||||
void *key G_GNUC_UNUSED,
|
||||
virNWFilterObjListCopyNames(void *key G_GNUC_UNUSED,
|
||||
void *payload,
|
||||
void *opaque)
|
||||
{
|
||||
virNWFilterObj *obj = payload;
|
||||
@ -460,15 +460,15 @@ struct virNWFilterListData {
|
||||
|
||||
|
||||
static void
|
||||
virNWFilterObjListCollectIterator(void *payload,
|
||||
void *key G_GNUC_UNUSED,
|
||||
virNWFilterObjListCollectIterator(void *key G_GNUC_UNUSED,
|
||||
void *payload,
|
||||
void *opaque)
|
||||
{
|
||||
struct virNWFilterListData *data = opaque;
|
||||
virNWFilterObj *obj = payload;
|
||||
|
||||
virNWFilterObjLock(obj);
|
||||
data->filters[data->nfilters++] = payload;
|
||||
data->filters[data->nfilters++] = obj;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user