diff options
Diffstat (limited to 'network.c')
-rw-r--r-- | network.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -1252,14 +1252,14 @@ void NetworkIPListInit() { gethostname(hostname,250); DEBUG(misc,2) ("[NET][IP] init for host %s", hostname); he=gethostbyname((char *) hostname); -
- if (he == NULL) {
- he = gethostbyname("localhost");
- }
-
- if (he == NULL) {
- bcaddr = inet_addr("127.0.0.1");
- he = gethostbyaddr(inet_ntoa(*(struct in_addr *) &bcaddr), sizeof(bcaddr), AF_INET);
+ + if (he == NULL) { + he = gethostbyname("localhost"); + } + + if (he == NULL) { + bcaddr = inet_addr("127.0.0.1"); + he = gethostbyaddr(inet_ntoa(*(struct in_addr *) &bcaddr), sizeof(bcaddr), AF_INET); } if (he == NULL) { |