cli: trivial; use mtu variable instead of calling *_get_mtu() again
This commit is contained in:
@@ -1079,7 +1079,7 @@ nmc_property_ib_get_mtu (NMSetting *setting)
|
|||||||
if (mtu == 0)
|
if (mtu == 0)
|
||||||
return g_strdup (_("auto"));
|
return g_strdup (_("auto"));
|
||||||
else
|
else
|
||||||
return g_strdup_printf ("%d", nm_setting_infiniband_get_mtu (s_infiniband));
|
return g_strdup_printf ("%d", mtu);
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
@@ -1262,7 +1262,7 @@ nmc_property_wired_get_mtu (NMSetting *setting)
|
|||||||
if (mtu == 0)
|
if (mtu == 0)
|
||||||
return g_strdup (_("auto"));
|
return g_strdup (_("auto"));
|
||||||
else
|
else
|
||||||
return g_strdup_printf ("%d", nm_setting_wired_get_mtu (s_wired));
|
return g_strdup_printf ("%d", mtu);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* --- NM_SETTING_WIRELESS_SETTING_NAME property get functions --- */
|
/* --- NM_SETTING_WIRELESS_SETTING_NAME property get functions --- */
|
||||||
@@ -1303,7 +1303,7 @@ nmc_property_wireless_get_mtu (NMSetting *setting)
|
|||||||
if (mtu == 0)
|
if (mtu == 0)
|
||||||
return g_strdup (_("auto"));
|
return g_strdup (_("auto"));
|
||||||
else
|
else
|
||||||
return g_strdup_printf ("%d", nm_setting_wireless_get_mtu (s_wireless));
|
return g_strdup_printf ("%d", mtu);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* --- NM_SETTING_WIRELESS_SECURITY_SETTING_NAME property get functions --- */
|
/* --- NM_SETTING_WIRELESS_SECURITY_SETTING_NAME property get functions --- */
|
||||||
|
Reference in New Issue
Block a user