From 99376bd261029c75b3a69219eb72bbb5276b9b4a Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Mon, 9 Oct 2017 22:04:52 +0200 Subject: [PATCH] wwan: fix uninitialized variable in ofono's context_property_changed() --- src/devices/wwan/nm-modem-ofono.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/devices/wwan/nm-modem-ofono.c b/src/devices/wwan/nm-modem-ofono.c index 7f43afc9e1..095f71bccc 100644 --- a/src/devices/wwan/nm-modem-ofono.c +++ b/src/devices/wwan/nm-modem-ofono.c @@ -981,13 +981,12 @@ context_property_changed (GDBusProxy *proxy, _LOGI ("MessageProxy: %s", s); if ( s && nm_utils_parse_inaddr_bin (AF_INET, s, &address_network)) { - NMPlatformIP4Route mms_route; - - mms_route.network = address_network; - mms_route.plen = 32; - mms_route.gateway = gateway_network; - - mms_route.metric = 1; + const NMPlatformIP4Route mms_route = { + .network = address_network, + .plen = 32, + .gateway = gateway_network, + .metric = 1, + }; nm_ip4_config_add_route (priv->ip4_config, &mms_route, NULL); } else {