mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-24 05:25:18 +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
|
static void
|
||||||
virNWFilterObjListCount(void *payload,
|
virNWFilterObjListCount(void *key G_GNUC_UNUSED,
|
||||||
void *key G_GNUC_UNUSED,
|
void *payload,
|
||||||
void *opaque)
|
void *opaque)
|
||||||
{
|
{
|
||||||
virNWFilterObj *obj = payload;
|
virNWFilterObj *obj = payload;
|
||||||
@ -417,8 +417,8 @@ struct virNWFilterNameData {
|
|||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
virNWFilterObjListCopyNames(void *payload,
|
virNWFilterObjListCopyNames(void *key G_GNUC_UNUSED,
|
||||||
void *key G_GNUC_UNUSED,
|
void *payload,
|
||||||
void *opaque)
|
void *opaque)
|
||||||
{
|
{
|
||||||
virNWFilterObj *obj = payload;
|
virNWFilterObj *obj = payload;
|
||||||
@ -460,15 +460,15 @@ struct virNWFilterListData {
|
|||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
virNWFilterObjListCollectIterator(void *payload,
|
virNWFilterObjListCollectIterator(void *key G_GNUC_UNUSED,
|
||||||
void *key G_GNUC_UNUSED,
|
void *payload,
|
||||||
void *opaque)
|
void *opaque)
|
||||||
{
|
{
|
||||||
struct virNWFilterListData *data = opaque;
|
struct virNWFilterListData *data = opaque;
|
||||||
virNWFilterObj *obj = payload;
|
virNWFilterObj *obj = payload;
|
||||||
|
|
||||||
virNWFilterObjLock(obj);
|
virNWFilterObjLock(obj);
|
||||||
data->filters[data->nfilters++] = payload;
|
data->filters[data->nfilters++] = obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user