commit b096c27377233acc26f886188b61aebe644d3a11
parent d8f98a5f200a75803c8eb2d69bf58bd45322136d
Author: Tim Kourt <tim.a.kourt@linux.intel.com>
Date: Wed, 23 Oct 2019 13:24:00 -0700
hotspot: eliminate double assignment of variable
Diffstat:
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/hotspot.c b/src/hotspot.c
@@ -320,7 +320,7 @@ static struct hs20_config *hs20_config_new(struct l_settings *settings,
char **nai_realms = NULL;
const char *rc_str;
char *name;
- bool autoconnect = true;
+ bool autoconnect;
/* One of HESSID, NAI realms, or Roaming Consortium must be included */
hessid_str = l_settings_get_string(settings, "Hotspot", "HESSID");
@@ -330,7 +330,9 @@ static struct hs20_config *hs20_config_new(struct l_settings *settings,
rc_str = l_settings_get_value(settings, "Hotspot", "RoamingConsortium");
- l_settings_get_bool(settings, "Settings", "Autoconnect", &autoconnect);
+ if (!l_settings_get_bool(settings, "Settings", "Autoconnect",
+ &autoconnect))
+ autoconnect = true;
name = l_settings_get_string(settings, "Hotspot", "Name");