ifcfg-rh: get rid of an extra unused variable
This saves a couple of bits we could instead use to save memories of the better days.
This commit is contained in:
@@ -1392,7 +1392,6 @@ make_ip6_setting (shvarFile *ifcfg,
|
|||||||
gboolean ip6_privacy = FALSE, ip6_privacy_prefer_public_ip;
|
gboolean ip6_privacy = FALSE, ip6_privacy_prefer_public_ip;
|
||||||
NMSettingIP6ConfigPrivacy ip6_privacy_val;
|
NMSettingIP6ConfigPrivacy ip6_privacy_val;
|
||||||
NMSettingIP6ConfigAddrGenMode addr_gen_mode;
|
NMSettingIP6ConfigAddrGenMode addr_gen_mode;
|
||||||
char *tmp;
|
|
||||||
|
|
||||||
s_ip6 = (NMSettingIPConfig *) nm_setting_ip6_config_new ();
|
s_ip6 = (NMSettingIPConfig *) nm_setting_ip6_config_new ();
|
||||||
|
|
||||||
@@ -1476,20 +1475,20 @@ make_ip6_setting (shvarFile *ifcfg,
|
|||||||
/* TODO - handle other methods */
|
/* TODO - handle other methods */
|
||||||
|
|
||||||
/* Read IPv6 Privacy Extensions configuration */
|
/* Read IPv6 Privacy Extensions configuration */
|
||||||
tmp = svGetValueString (ifcfg, "IPV6_PRIVACY");
|
str_value = svGetValueString (ifcfg, "IPV6_PRIVACY");
|
||||||
if (tmp) {
|
if (str_value) {
|
||||||
ip6_privacy = svGetValueBoolean (ifcfg, "IPV6_PRIVACY", FALSE);
|
ip6_privacy = svGetValueBoolean (ifcfg, "IPV6_PRIVACY", FALSE);
|
||||||
if (!ip6_privacy)
|
if (!ip6_privacy)
|
||||||
ip6_privacy = (g_strcmp0 (tmp, "rfc4941") == 0) ||
|
ip6_privacy = (g_strcmp0 (str_value, "rfc4941") == 0) ||
|
||||||
(g_strcmp0 (tmp, "rfc3041") == 0);
|
(g_strcmp0 (str_value, "rfc3041") == 0);
|
||||||
}
|
}
|
||||||
ip6_privacy_prefer_public_ip = svGetValueBoolean (ifcfg, "IPV6_PRIVACY_PREFER_PUBLIC_IP", FALSE);
|
ip6_privacy_prefer_public_ip = svGetValueBoolean (ifcfg, "IPV6_PRIVACY_PREFER_PUBLIC_IP", FALSE);
|
||||||
ip6_privacy_val = tmp ?
|
ip6_privacy_val = str_value ?
|
||||||
(ip6_privacy ?
|
(ip6_privacy ?
|
||||||
(ip6_privacy_prefer_public_ip ? NM_SETTING_IP6_CONFIG_PRIVACY_PREFER_PUBLIC_ADDR : NM_SETTING_IP6_CONFIG_PRIVACY_PREFER_TEMP_ADDR) :
|
(ip6_privacy_prefer_public_ip ? NM_SETTING_IP6_CONFIG_PRIVACY_PREFER_PUBLIC_ADDR : NM_SETTING_IP6_CONFIG_PRIVACY_PREFER_TEMP_ADDR) :
|
||||||
NM_SETTING_IP6_CONFIG_PRIVACY_DISABLED) :
|
NM_SETTING_IP6_CONFIG_PRIVACY_DISABLED) :
|
||||||
NM_SETTING_IP6_CONFIG_PRIVACY_UNKNOWN;
|
NM_SETTING_IP6_CONFIG_PRIVACY_UNKNOWN;
|
||||||
g_free (tmp);
|
g_free (str_value);
|
||||||
|
|
||||||
g_object_set (s_ip6,
|
g_object_set (s_ip6,
|
||||||
NM_SETTING_IP_CONFIG_METHOD, method,
|
NM_SETTING_IP_CONFIG_METHOD, method,
|
||||||
@@ -1574,14 +1573,14 @@ make_ip6_setting (shvarFile *ifcfg,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* IPv6 addressing mode configuration */
|
/* IPv6 addressing mode configuration */
|
||||||
tmp = svGetValueString (ifcfg, "IPV6_ADDR_GEN_MODE");
|
str_value = svGetValueString (ifcfg, "IPV6_ADDR_GEN_MODE");
|
||||||
if (tmp) {
|
if (str_value) {
|
||||||
if (nm_utils_enum_from_str (nm_setting_ip6_config_addr_gen_mode_get_type (), tmp,
|
if (nm_utils_enum_from_str (nm_setting_ip6_config_addr_gen_mode_get_type (), str_value,
|
||||||
(int *) &addr_gen_mode, NULL))
|
(int *) &addr_gen_mode, NULL))
|
||||||
g_object_set (s_ip6, NM_SETTING_IP6_CONFIG_ADDR_GEN_MODE, addr_gen_mode, NULL);
|
g_object_set (s_ip6, NM_SETTING_IP6_CONFIG_ADDR_GEN_MODE, addr_gen_mode, NULL);
|
||||||
else
|
else
|
||||||
PARSE_WARNING ("Invalid IPV6_ADDR_GEN_MODE");
|
PARSE_WARNING ("Invalid IPV6_ADDR_GEN_MODE");
|
||||||
g_free (tmp);
|
g_free (str_value);
|
||||||
} else {
|
} else {
|
||||||
g_object_set (s_ip6,
|
g_object_set (s_ip6,
|
||||||
NM_SETTING_IP6_CONFIG_ADDR_GEN_MODE,
|
NM_SETTING_IP6_CONFIG_ADDR_GEN_MODE,
|
||||||
@@ -1590,10 +1589,10 @@ make_ip6_setting (shvarFile *ifcfg,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* IPv6 tokenized interface identifier */
|
/* IPv6 tokenized interface identifier */
|
||||||
tmp = svGetValueString (ifcfg, "IPV6_TOKEN");
|
str_value = svGetValueString (ifcfg, "IPV6_TOKEN");
|
||||||
if (tmp) {
|
if (str_value) {
|
||||||
g_object_set (s_ip6, NM_SETTING_IP6_CONFIG_TOKEN, tmp, NULL);
|
g_object_set (s_ip6, NM_SETTING_IP6_CONFIG_TOKEN, str_value, NULL);
|
||||||
g_free (tmp);
|
g_free (str_value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* DNS servers
|
/* DNS servers
|
||||||
|
Reference in New Issue
Block a user