diff options
author | Darkvater <Darkvater@openttd.org> | 2006-10-18 13:17:46 +0000 |
---|---|---|
committer | Darkvater <Darkvater@openttd.org> | 2006-10-18 13:17:46 +0000 |
commit | 83bed3910675591326a77f11188ece7baa8e5d20 (patch) | |
tree | 1be40857750c8b591b52bf5cf52bc3ba767fa093 /network.c | |
parent | 8e121eea701fb4da7194a4b6eb9b429b2e24240e (diff) | |
download | openttd-83bed3910675591326a77f11188ece7baa8e5d20.tar.xz |
(svn r6820) -Codechange: Some more const correctness, coding style.
-Codechange: Add FOR_ALL_ACTIVE_CLIENT_INFOS macro that will loop all clients
skipping inactive ones.
Diffstat (limited to 'network.c')
-rw-r--r-- | network.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -55,7 +55,7 @@ NetworkClientInfo *NetworkFindClientInfoFromIndex(uint16 client_index) { NetworkClientInfo *ci; - for (ci = _network_client_info; ci != &_network_client_info[MAX_CLIENT_INFO]; ci++) { + for (ci = _network_client_info; ci != endof(_network_client_info); ci++) { if (ci->client_index == client_index) return ci; } @@ -70,7 +70,7 @@ NetworkClientInfo *NetworkFindClientInfoFromIP(const char *ip) NetworkClientInfo *ci; uint32 ip_number = inet_addr(ip); - for (ci = _network_client_info; ci != &_network_client_info[MAX_CLIENT_INFO]; ci++) { + for (ci = _network_client_info; ci != endof(_network_client_info); ci++) { if (ci->client_ip == ip_number) return ci; } |