diff options
author | Thomas Haller <thaller@redhat.com> | 2018-01-17 09:18:39 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2018-01-17 10:17:31 +0100 |
commit | f2aa286fa92a8fa6c96d8b7db09e6fb5519bea13 (patch) | |
tree | 1c7f26fd6bb476b66652297cf13748345fc25ef7 | |
parent | 3c6cc7c2e0361f6651f58469ab76f7deb37a1cbe (diff) | |
download | NetworkManager-f2aa286fa92a8fa6c96d8b7db09e6fb5519bea13.tar.gz |
libnm: cast guint32 argument to guint in variadic g_object_set()
yes, this is not an issue in practice. Variadic arguments are always
propagated to at least int/unsigned type. And kernel and glib both require
sizeof(guint32) <= sizeof(guint). Hence, this was safe on any supported
architecture. Still, let's be explicit about the types.
-rw-r--r-- | libnm-core/nm-connection.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libnm-core/nm-connection.c b/libnm-core/nm-connection.c index 9fd46fdf96..1773841dac 100644 --- a/libnm-core/nm-connection.c +++ b/libnm-core/nm-connection.c @@ -959,7 +959,7 @@ _normalize_infiniband_mtu (NMConnection *self, GHashTable *parameters) max_mtu = 65520; if (max_mtu && nm_setting_infiniband_get_mtu (s_infini) > max_mtu) { - g_object_set (s_infini, NM_SETTING_INFINIBAND_MTU, max_mtu, NULL); + g_object_set (s_infini, NM_SETTING_INFINIBAND_MTU, (guint) max_mtu, NULL); return TRUE; } } |