diff options
author | tron <tron@openttd.org> | 2006-08-31 14:51:50 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2006-08-31 14:51:50 +0000 |
commit | 453028b3a7f0fbe646d4a99781fe43ce99386549 (patch) | |
tree | c94e61968d26d026c3843d46d0199421c0b03b74 | |
parent | c4fb78a7089a9fca0b3bd59187a07ef83d726a67 (diff) | |
download | openttd-453028b3a7f0fbe646d4a99781fe43ce99386549.tar.xz |
(svn r6275) Get rid of an ugly cast
-rw-r--r-- | network_server.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/network_server.h b/network_server.h index 89b05aff4..4b98bf31b 100644 --- a/network_server.h +++ b/network_server.h @@ -22,7 +22,10 @@ void NetworkServerYearlyLoop(void); static inline const char* GetPlayerIP(const NetworkClientInfo* ci) { - return inet_ntoa(*(const struct in_addr*)&ci->client_ip); + struct in_addr addr; + + addr.s_addr = ci->client_ip; + return inet_ntoa(addr); } #endif /* ENABLE_NETWORK */ |