From c8a9209d77a896bf49227e5aeccd54e91ccf29cc Mon Sep 17 00:00:00 2001 From: xHire Date: Sat, 25 Oct 2008 14:11:06 +0200 Subject: Changed style of the code to the K&R standard --- src/net/dns.c | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) (limited to 'src/net/dns.c') diff --git a/src/net/dns.c b/src/net/dns.c index 44bb6ae..2167a52 100644 --- a/src/net/dns.c +++ b/src/net/dns.c @@ -1,27 +1,26 @@ #ifndef __WIN32__ -# include -# include -# include -# include +# include +# include +# include +# include #else -# include -# include +# include +# include #endif #include #include "main.h" -char * -getIPFormDNS(char *domain) +char *getIPFormDNS(char *domain) { - struct hostent *host; + struct hostent *host; - host = gethostbyname(domain); + host = gethostbyname(domain); - if (host == NULL || host->h_addr_list[0] == NULL) { - return NULL; - } + if (host == NULL || host->h_addr_list[0] == NULL) { + return NULL; + } - return strdup(inet_ntoa(*((struct in_addr *) host->h_addr_list[0]))); + return strdup(inet_ntoa(*((struct in_addr *) host->h_addr_list[0]))); } -- cgit v1.2.3