summary refs log tree commit diff
path: root/clients/cli/general.c
diff options
context:
space:
mode:
Diffstat (limited to 'clients/cli/general.c')
-rw-r--r--clients/cli/general.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/clients/cli/general.c b/clients/cli/general.c
index 12e76efd..68fab6e0 100644
--- a/clients/cli/general.c
+++ b/clients/cli/general.c
@@ -1136,10 +1136,10 @@ device_overview (NmCli *nmc, NMDevice *device)
 	else
 		g_string_append_printf (outbuf, "%s, ", _("hw"));
 
-	if (   nm_device_get_ip_iface (device)
-	    && g_strcmp0 (nm_device_get_ip_iface (device), nm_device_get_iface (device))
-	    && g_strcmp0 (nm_device_get_ip_iface (device), ""))
-		g_string_append_printf (outbuf, "%s %s,", _("iface"), nm_device_get_ip_iface (device));
+	if (!NM_IN_STRSET (nm_device_get_ip_iface (device),
+	                   NULL,
+	                   nm_device_get_iface (device)))
+		g_string_append_printf (outbuf, "%s %s, ", _("iface"), nm_device_get_ip_iface (device));
 
 	if (nm_device_get_physical_port_id (device))
 		g_string_append_printf (outbuf, "%s %s, ", _("port"), nm_device_get_physical_port_id (device));