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>
This commit is contained in:
parent
fdc7e5af28
commit
32ae5735e3
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue