libnm-util: Fix a minor type problem with GValue

The code was passing the gpointer alias of the GValue, rather than the
GValue* itself. This doesn’t matter normally, but broke an experimental
patch in GLib to remove a cast from G_VALUE_TYPE.

We’ve reverted the patch in GLib (see
https://bugzilla.gnome.org/show_bug.cgi?id=793186), but this should be
fixed in NetworkManager anyway.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://bugzilla.gnome.org/show_bug.cgi?id=793302
This commit is contained in:
Philip Withnall 2018-02-08 14:30:49 +00:00 committed by Thomas Haller
parent f7b5e48cdb
commit daadb8fbe9

View File

@ -470,7 +470,7 @@ value_dup (gpointer key, gpointer val, gpointer user_data)
GValue *dup_value;
dup_value = g_slice_new0 (GValue);
g_value_init (dup_value, G_VALUE_TYPE (val));
g_value_init (dup_value, G_VALUE_TYPE (value));
g_value_copy (value, dup_value);
g_hash_table_insert (table, g_strdup ((char *) key), dup_value);