Mercurial > hg > openttd
changeset 9851:fb26a3a0a745 draft
(svn r13995) -Fix (r13988): some warnings of the compile farm.
author | rubidium <rubidium@openttd.org> |
---|---|
date | Mon, 04 Aug 2008 18:27:54 +0000 |
parents | 00c8758ef6b8 |
children | 3bb1d9cfc8ff |
files | src/network/core/host.cpp |
diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/network/core/host.cpp +++ b/src/network/core/host.cpp @@ -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 */