aboutsummaryrefslogtreecommitdiffstats
path: root/ui/iface_lists.c
diff options
context:
space:
mode:
authorMartin Kaiser <wireshark@kaiser.cx>2014-07-07 05:28:37 +0200
committerMartin Kaiser <wireshark@kaiser.cx>2014-07-08 13:39:50 +0000
commit32ae5735e3fa4a650fd679cfad6b70ac89872ecd (patch)
treeab46f1e25f3eb590a833bda1ec8dc1c63e876736 /ui/iface_lists.c
parentfdc7e5af28991f54534ba2d35c5f2d46e362185f (diff)
don't print the interface description if it's null
(named pipes added with -i <pipe name> don't have such a description) Change-Id: I5986c607f5103b800c4353fd3cf01f24149e2e5c Reviewed-on: https://code.wireshark.org/review/2940 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx> Tested-by: Martin Kaiser <wireshark@kaiser.cx>
Diffstat (limited to 'ui/iface_lists.c')
-rw-r--r--ui/iface_lists.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ui/iface_lists.c b/ui/iface_lists.c
index 26702fc184..b28236b177 100644
--- a/ui/iface_lists.c
+++ b/ui/iface_lists.c
@@ -323,7 +323,9 @@ scan_local_interfaces(void (*update_cb)(void))
}
if (!found) { /* new interface, maybe a pipe */
device.name = g_strdup(interface_opts.name);
- device.display_name = g_strdup_printf("%s: %s", device.name, interface_opts.descr);
+ device.display_name = interface_opts.descr ?
+ g_strdup_printf("%s: %s", device.name, interface_opts.descr) :
+ g_strdup_printf("%s", device.name);
device.hidden = FALSE;
device.selected = TRUE;
device.type = IF_PIPE;