diff options
author | Bill Meier <wmeier@newsguy.com> | 2015-02-13 13:43:32 -0500 |
---|---|---|
committer | Bill Meier <wmeier@newsguy.com> | 2015-02-13 18:45:23 +0000 |
commit | 6040bcd5f8b83c3ba4d1cd96730bb695a232e75d (patch) | |
tree | cbb0e767937b71a5ce11ee184a7ba000cfa31598 /caputils/capture-pcap-util-unix.c | |
parent | 82f081dd64d6d193f23716a388b9c45f90431454 (diff) | |
download | wireshark-6040bcd5f8b83c3ba4d1cd96730bb695a232e75d.tar.gz |
caputils/*.c: As needed: Add editor modelines & Fix indentation
Change-Id: I081446fbbc242c01f8ac9dede575c3ea77421c42
Reviewed-on: https://code.wireshark.org/review/7103
Reviewed-by: Bill Meier <wmeier@newsguy.com>
Diffstat (limited to 'caputils/capture-pcap-util-unix.c')
-rw-r--r-- | caputils/capture-pcap-util-unix.c | 61 |
1 files changed, 37 insertions, 24 deletions
diff --git a/caputils/capture-pcap-util-unix.c b/caputils/capture-pcap-util-unix.c index cdc55a04f0..a39ba0a020 100644 --- a/caputils/capture-pcap-util-unix.c +++ b/caputils/capture-pcap-util-unix.c @@ -75,31 +75,31 @@ struct rtentry; #ifdef HAVE_PCAP_REMOTE GList * get_remote_interface_list(const char *hostname, const char *port, - int auth_type, const char *username, - const char *passwd, int *err, char **err_str) + int auth_type, const char *username, + const char *passwd, int *err, char **err_str) { - struct pcap_rmtauth auth; - char source[PCAP_BUF_SIZE]; - char errbuf[PCAP_ERRBUF_SIZE]; - GList *result; - - if (pcap_createsrcstr(source, PCAP_SRC_IFREMOTE, hostname, port, - NULL, errbuf) == -1) { - *err = CANT_GET_INTERFACE_LIST; - if (err_str != NULL) - *err_str = cant_get_if_list_error_message(errbuf); - return NULL; - } - - auth.type = auth_type; - auth.username = g_strdup(username); - auth.password = g_strdup(passwd); - - result = get_interface_list_findalldevs_ex(source, &auth, err, err_str); - g_free(auth.username); - g_free(auth.password); - - return result; + struct pcap_rmtauth auth; + char source[PCAP_BUF_SIZE]; + char errbuf[PCAP_ERRBUF_SIZE]; + GList *result; + + if (pcap_createsrcstr(source, PCAP_SRC_IFREMOTE, hostname, port, + NULL, errbuf) == -1) { + *err = CANT_GET_INTERFACE_LIST; + if (err_str != NULL) + *err_str = cant_get_if_list_error_message(errbuf); + return NULL; + } + + auth.type = auth_type; + auth.username = g_strdup(username); + auth.password = g_strdup(passwd); + + result = get_interface_list_findalldevs_ex(source, &auth, err, err_str); + g_free(auth.username); + g_free(auth.password); + + return result; } #endif @@ -520,3 +520,16 @@ get_runtime_caplibs_version(GString *str _U_) } #endif /* HAVE_LIBPCAP */ + +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 8 + * tab-width: 8 + * indent-tabs-mode: t + * End: + * + * vi: set shiftwidth=8 tabstop=8 noexpandtab: + * :indentSize=8:tabSize=8:noTabs=false: + */ |