aboutsummaryrefslogtreecommitdiffstats
path: root/wsutil
diff options
context:
space:
mode:
authorDario Lombardo <lomato@gmail.com>2016-08-24 16:54:02 +0200
committerMichael Mann <mmann78@netscape.net>2016-08-25 00:29:54 +0000
commita1af188aedceb90ba0af4e1af3faa6b36da54d40 (patch)
treebd5d0a9524e349db328b0928f1b8534c81324a8b /wsutil
parent4cf9a1dca07a328d016894d7730b68e836229cde (diff)
wsutil: fix indentation of interface.c
Change-Id: Icf0c0c4ce1e3763eb385de24dc608a120e0f4af2 Reviewed-on: https://code.wireshark.org/review/17307 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'wsutil')
-rw-r--r--wsutil/interface.c84
1 files changed, 42 insertions, 42 deletions
diff --git a/wsutil/interface.c b/wsutil/interface.c
index 73e6a01ebf..4cd8b5954c 100644
--- a/wsutil/interface.c
+++ b/wsutil/interface.c
@@ -30,77 +30,77 @@
#include <wsutil/inet_addr.h>
#ifdef HAVE_SYS_TYPES_H
- #include <sys/types.h>
+ #include <sys/types.h>
#endif
#ifdef HAVE_SYS_SOCKET_H
- #include <sys/socket.h>
+ #include <sys/socket.h>
#endif
#ifdef HAVE_NETINET_IN_H
- #include <netinet/in.h>
+ #include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_INET_H
- #include <arpa/inet.h>
+ #include <arpa/inet.h>
#endif
#ifdef HAVE_IFADDRS_H
- #include <ifaddrs.h>
+ #include <ifaddrs.h>
#endif
GSList *local_interfaces_to_list(void)
{
- GSList *interfaces = NULL;
+ GSList *interfaces = NULL;
#ifdef HAVE_GETIFADDRS
- struct ifaddrs *ifap;
- struct ifaddrs *ifa;
- int family;
- char ip[INET6_ADDRSTRLEN];
+ struct ifaddrs *ifap;
+ struct ifaddrs *ifa;
+ int family;
+ char ip[INET6_ADDRSTRLEN];
- if (getifaddrs(&ifap)) {
- goto end;
- }
+ if (getifaddrs(&ifap)) {
+ goto end;
+ }
- for (ifa = ifap; ifa != NULL; ifa = ifa->ifa_next) {
- if (ifa->ifa_addr == NULL)
- continue;
+ for (ifa = ifap; ifa != NULL; ifa = ifa->ifa_next) {
+ if (ifa->ifa_addr == NULL)
+ continue;
- family = ifa->ifa_addr->sa_family;
+ family = ifa->ifa_addr->sa_family;
- memset(ip, 0x0, INET6_ADDRSTRLEN);
+ memset(ip, 0x0, INET6_ADDRSTRLEN);
- switch (family) {
- case AF_INET:
- {
- struct sockaddr_in *addr4 = (struct sockaddr_in *)ifa->ifa_addr;
- ws_inet_ntop4(&addr4->sin_addr, ip, sizeof(ip));
- break;
- }
+ switch (family) {
+ case AF_INET:
+ {
+ struct sockaddr_in *addr4 = (struct sockaddr_in *)ifa->ifa_addr;
+ ws_inet_ntop4(&addr4->sin_addr, ip, sizeof(ip));
+ break;
+ }
- case AF_INET6:
- {
- struct sockaddr_in6 *addr6 = (struct sockaddr_in6 *)ifa->ifa_addr;
- ws_inet_ntop6(&addr6->sin6_addr, ip, sizeof(ip));
- break;
- }
+ case AF_INET6:
+ {
+ struct sockaddr_in6 *addr6 = (struct sockaddr_in6 *)ifa->ifa_addr;
+ ws_inet_ntop6(&addr6->sin6_addr, ip, sizeof(ip));
+ break;
+ }
- default:
- break;
- }
+ default:
+ break;
+ }
- /* skip loopback addresses */
- if (!g_strcmp0(ip, "127.0.0.1") || !g_strcmp0(ip, "::1"))
- continue;
+ /* skip loopback addresses */
+ if (!g_strcmp0(ip, "127.0.0.1") || !g_strcmp0(ip, "::1"))
+ continue;
- if (*ip) {
- interfaces = g_slist_prepend(interfaces, g_strdup(ip));
+ if (*ip) {
+ interfaces = g_slist_prepend(interfaces, g_strdup(ip));
+ }
}
- }
- freeifaddrs(ifap);
+ freeifaddrs(ifap);
end:
#endif /* HAVE_GETIFADDRS */
- return interfaces;
+ return interfaces;
}
/*