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 | 68314cf576b7c28e1132d9d640af2205c0484ff1 (patch) | |
tree | 1be40857750c8b591b52bf5cf52bc3ba767fa093 /network.c | |
parent | ccc1ad52d9222e70f1585f83d61ee0a1281681f6 (diff) | |
download | openttd-68314cf576b7c28e1132d9d640af2205c0484ff1.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; } |