From 230f3167b70b5d73b3d9c0c650c9a654c06ccb51 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Tue, 21 Jul 2009 20:26:53 +0200 Subject: Add modelines and retab! all files --- src/get_ip_addr.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/get_ip_addr.c') diff --git a/src/get_ip_addr.c b/src/get_ip_addr.c index de03d8c..ba39a3d 100644 --- a/src/get_ip_addr.c +++ b/src/get_ip_addr.c @@ -1,3 +1,4 @@ +// vim:ts=8:expandtab #include #include #include @@ -32,11 +33,11 @@ const char *get_ip_addr(const char *interface) { if (ioctl(general_socket, SIOCGIFADDR, &ifr) < 0) return "no IP"; - int ret; - if ((ret = getnameinfo(&ifr.ifr_addr, len, part, sizeof(part), NULL, 0, NI_NUMERICHOST)) != 0) { - fprintf(stderr, "getnameinfo(): %s\n", gai_strerror(ret)); - return "no IP"; - } + int ret; + if ((ret = getnameinfo(&ifr.ifr_addr, len, part, sizeof(part), NULL, 0, NI_NUMERICHOST)) != 0) { + fprintf(stderr, "getnameinfo(): %s\n", gai_strerror(ret)); + return "no IP"; + } return part; } -- cgit v1.2.3