(svn r13995) -Fix (r13988): some warnings of the compile farm.
authorrubidium
Mon, 04 Aug 2008 18:27:54 +0000
changeset 9851 20680f5b9c3a
parent 9850 61bd42a09ddd
child 9852 a4ff032669c6
(svn r13995) -Fix (r13988): some warnings of the compile farm.
src/network/core/host.cpp
--- a/src/network/core/host.cpp	Mon Aug 04 17:27:06 2008 +0000
+++ b/src/network/core/host.cpp	Mon Aug 04 18:27:54 2008 +0000
@@ -43,14 +43,14 @@
 
 	if (sock < 0) {
 		DEBUG(net, 0, "[core] error creating socket");
-		return;
+		return 0;
 	}
 
 	char *output_pointer = NULL;
 	int output_length = _netstat(sock, &output_pointer, 1);
 	if (output_length < 0) {
 		DEBUG(net, 0, "[core] error running _netstat");
-		return;
+		return 0;
 	}
 
 	int index;
@@ -155,7 +155,7 @@
 	}
 
 	const char *buf_end = buf + ifconf.ifc_len;
-	int index;
+	int index = 0;
 	for (const char *p = buf; p < buf_end && index != 0;) {
 		const struct ifreq* req = (const struct ifreq*)p;
 
@@ -177,6 +177,8 @@
 	}
 
 	closesocket(sock);
+	
+	return index;
 }
 #endif /* all NetworkFindBroadcastIPsInternals */