mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-17 21:25:40 +00:00
(svn r6275) Get rid of an ugly cast
This commit is contained in:
parent
c4fb78a708
commit
453028b3a7
@ -22,7 +22,10 @@ void NetworkServerYearlyLoop(void);
|
|||||||
|
|
||||||
static inline const char* GetPlayerIP(const NetworkClientInfo* ci)
|
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 */
|
#endif /* ENABLE_NETWORK */
|
||||||
|
Loading…
Reference in New Issue
Block a user