diff options
author | Dario Lombardo <lomato@gmail.com> | 2016-03-02 14:58:52 +0100 |
---|---|---|
committer | Roland Knall <rknall@gmail.com> | 2016-03-17 07:28:52 +0000 |
commit | 8def5c40ded9e31cda4cdd897dd19537fe8fe5d9 (patch) | |
tree | 99ca8cf001e1921c1ba12f91fbca486b8730360f | |
parent | e37275bfdee7a0ea4745def144d4a0e5c62e282d (diff) | |
download | wireshark-8def5c40ded9e31cda4cdd897dd19537fe8fe5d9.tar.gz wireshark-8def5c40ded9e31cda4cdd897dd19537fe8fe5d9.tar.bz2 wireshark-8def5c40ded9e31cda4cdd897dd19537fe8fe5d9.zip |
extcap-base: remove print of version if no interfaces present.
When no interfaces are available (as with androiddump when adb
is not running) version is not printed anymore, for a cleaner
output.
Change-Id: Ia150a58ff1c04e412ff29a540f18e1fe9612f633
Reviewed-on: https://code.wireshark.org/review/14289
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
-rw-r--r-- | extcap/extcap-base.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/extcap/extcap-base.c b/extcap/extcap-base.c index ece98095cd..17bf227f25 100644 --- a/extcap/extcap-base.c +++ b/extcap/extcap-base.c @@ -195,11 +195,13 @@ static void extcap_print_version(extcap_parameters * extcap) static gint extcap_iface_listall(extcap_parameters * extcap, uint8_t list_ifs) { if (list_ifs) { - extcap_print_version(extcap); - g_list_foreach(extcap->interfaces, extcap_iface_print, extcap); + if (g_list_length(extcap->interfaces) > 0) { + extcap_print_version(extcap); + g_list_foreach(extcap->interfaces, extcap_iface_print, extcap); + } } else { - if (extcap->do_version) { - extcap_print_version(extcap); + if (extcap->do_version) { + extcap_print_version(extcap); } else { GList * element = NULL; extcap_interface * iface = NULL; |