cli: minor refactoring of if-condition in device_overview

Note that nm_device_get_ip_iface() never returns an emptry string "".
This commit is contained in:
Thomas Haller 2017-06-09 15:23:44 +02:00
parent 126b0874f1
commit ee5fdcbfb5

View file

@ -1194,9 +1194,9 @@ device_overview (NmCli *nmc, NMDevice *device)
else else
g_string_append_printf (outbuf, "%s, ", _("hw")); g_string_append_printf (outbuf, "%s, ", _("hw"));
if ( nm_device_get_ip_iface (device) if (!NM_IN_STRSET (nm_device_get_ip_iface (device),
&& g_strcmp0 (nm_device_get_ip_iface (device), nm_device_get_iface (device)) NULL,
&& g_strcmp0 (nm_device_get_ip_iface (device), "")) nm_device_get_iface (device)))
g_string_append_printf (outbuf, "%s %s, ", _("iface"), nm_device_get_ip_iface (device)); g_string_append_printf (outbuf, "%s %s, ", _("iface"), nm_device_get_ip_iface (device));
if (nm_device_get_physical_port_id (device)) if (nm_device_get_physical_port_id (device))