dns: sd-resolved: fix hash table iteration

g_hash_table_iter_next() wants a (gpointer *), not an (int *).

Fixes: f70ee67058 ('dns: sd-resolved: reset interface configuration on deactivation')
This commit is contained in:
Beniamino Galvani
2020-11-30 22:32:33 +01:00
parent d0df9bf0bd
commit 526b484be1

View File

@@ -422,6 +422,7 @@ update(NMDnsPlugin * plugin,
gs_free gpointer * interfaces_keys = NULL; gs_free gpointer * interfaces_keys = NULL;
guint interfaces_len; guint interfaces_len;
int ifindex; int ifindex;
gpointer pointer;
NMDnsConfigIPData *ip_data; NMDnsConfigIPData *ip_data;
GHashTableIter iter; GHashTableIter iter;
guint i; guint i;
@@ -463,7 +464,8 @@ update(NMDnsPlugin * plugin,
* resolved, and the current update doesn't contain that interface, * resolved, and the current update doesn't contain that interface,
* reset the resolved configuration for that ifindex. */ * reset the resolved configuration for that ifindex. */
g_hash_table_iter_init(&iter, priv->dirty_interfaces); g_hash_table_iter_init(&iter, priv->dirty_interfaces);
while (g_hash_table_iter_next(&iter, (gpointer *) &ifindex, NULL)) { while (g_hash_table_iter_next(&iter, (gpointer *) &pointer, NULL)) {
ifindex = GPOINTER_TO_INT(pointer);
if (!g_hash_table_contains(interfaces, GINT_TO_POINTER(ifindex))) { if (!g_hash_table_contains(interfaces, GINT_TO_POINTER(ifindex))) {
InterfaceConfig ic; InterfaceConfig ic;