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;
|
||||
NMSettingIP6ConfigPrivacy ip6_privacy_val;
|
||||
NMSettingIP6ConfigAddrGenMode addr_gen_mode;
|
||||
char *tmp;
|
||||
|
||||
s_ip6 = (NMSettingIPConfig *) nm_setting_ip6_config_new ();
|
||||
|
||||
@@ -1476,20 +1475,20 @@ make_ip6_setting (shvarFile *ifcfg,
|
||||
/* TODO - handle other methods */
|
||||
|
||||
/* Read IPv6 Privacy Extensions configuration */
|
||||
tmp = svGetValueString (ifcfg, "IPV6_PRIVACY");
|
||||
if (tmp) {
|
||||
str_value = svGetValueString (ifcfg, "IPV6_PRIVACY");
|
||||
if (str_value) {
|
||||
ip6_privacy = svGetValueBoolean (ifcfg, "IPV6_PRIVACY", FALSE);
|
||||
if (!ip6_privacy)
|
||||
ip6_privacy = (g_strcmp0 (tmp, "rfc4941") == 0) ||
|
||||
(g_strcmp0 (tmp, "rfc3041") == 0);
|
||||
ip6_privacy = (g_strcmp0 (str_value, "rfc4941") == 0) ||
|
||||
(g_strcmp0 (str_value, "rfc3041") == 0);
|
||||
}
|
||||
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_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_UNKNOWN;
|
||||
g_free (tmp);
|
||||
g_free (str_value);
|
||||
|
||||
g_object_set (s_ip6,
|
||||
NM_SETTING_IP_CONFIG_METHOD, method,
|
||||
@@ -1574,14 +1573,14 @@ make_ip6_setting (shvarFile *ifcfg,
|
||||
}
|
||||
|
||||
/* IPv6 addressing mode configuration */
|
||||
tmp = svGetValueString (ifcfg, "IPV6_ADDR_GEN_MODE");
|
||||
if (tmp) {
|
||||
if (nm_utils_enum_from_str (nm_setting_ip6_config_addr_gen_mode_get_type (), tmp,
|
||||
str_value = svGetValueString (ifcfg, "IPV6_ADDR_GEN_MODE");
|
||||
if (str_value) {
|
||||
if (nm_utils_enum_from_str (nm_setting_ip6_config_addr_gen_mode_get_type (), str_value,
|
||||
(int *) &addr_gen_mode, NULL))
|
||||
g_object_set (s_ip6, NM_SETTING_IP6_CONFIG_ADDR_GEN_MODE, addr_gen_mode, NULL);
|
||||
else
|
||||
PARSE_WARNING ("Invalid IPV6_ADDR_GEN_MODE");
|
||||
g_free (tmp);
|
||||
g_free (str_value);
|
||||
} else {
|
||||
g_object_set (s_ip6,
|
||||
NM_SETTING_IP6_CONFIG_ADDR_GEN_MODE,
|
||||
@@ -1590,10 +1589,10 @@ make_ip6_setting (shvarFile *ifcfg,
|
||||
}
|
||||
|
||||
/* IPv6 tokenized interface identifier */
|
||||
tmp = svGetValueString (ifcfg, "IPV6_TOKEN");
|
||||
if (tmp) {
|
||||
g_object_set (s_ip6, NM_SETTING_IP6_CONFIG_TOKEN, tmp, NULL);
|
||||
g_free (tmp);
|
||||
str_value = svGetValueString (ifcfg, "IPV6_TOKEN");
|
||||
if (str_value) {
|
||||
g_object_set (s_ip6, NM_SETTING_IP6_CONFIG_TOKEN, str_value, NULL);
|
||||
g_free (str_value);
|
||||
}
|
||||
|
||||
/* DNS servers
|
||||
|
Reference in New Issue
Block a user