mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-09 08:18:03 +02:00
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:
parent
126b0874f1
commit
ee5fdcbfb5
1 changed files with 3 additions and 3 deletions
|
|
@ -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))
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue