diff --git a/src/backends/unix/network.c b/src/backends/unix/network.c index 2c81e63a..9b198057 100644 --- a/src/backends/unix/network.c +++ b/src/backends/unix/network.c @@ -366,7 +366,7 @@ NET_AdrToString(netadr_t a) } qboolean -NET_StringToSockaddr(char *s, struct sockaddr_storage *sadr) +NET_StringToSockaddr(const char *s, struct sockaddr_storage *sadr) { char copy[128]; char *addrs, *space; @@ -440,7 +440,7 @@ NET_StringToSockaddr(char *s, struct sockaddr_storage *sadr) } qboolean -NET_StringToAdr(char *s, netadr_t *a) +NET_StringToAdr(const char *s, netadr_t *a) { struct sockaddr_storage sadr; diff --git a/src/backends/windows/network.c b/src/backends/windows/network.c index 801b294a..11c255d4 100644 --- a/src/backends/windows/network.c +++ b/src/backends/windows/network.c @@ -385,7 +385,7 @@ NET_AdrToString(netadr_t a) * 192.246.40.70:28000 */ qboolean -NET_StringToSockaddr(char *s, struct sockaddr_storage *sadr) +NET_StringToSockaddr(const char *s, struct sockaddr_storage *sadr) { char copy[128]; char *addrs, *space; @@ -465,7 +465,7 @@ NET_StringToSockaddr(char *s, struct sockaddr_storage *sadr) * 192.246.40.70:28000 */ qboolean -NET_StringToAdr(char *s, netadr_t *a) +NET_StringToAdr(const char *s, netadr_t *a) { struct sockaddr_storage sadr; diff --git a/src/client/cl_network.c b/src/client/cl_network.c index 3a8496f9..028de796 100644 --- a/src/client/cl_network.c +++ b/src/client/cl_network.c @@ -494,7 +494,7 @@ CL_PingServers_f(void) int i; netadr_t adr; char name[32]; - char *adrstring; + const char *adrstring; cvar_t *noudp; cvar_t *noipx; @@ -530,7 +530,7 @@ CL_PingServers_f(void) for (i = 0; i < 16; i++) { Com_sprintf(name, sizeof(name), "adr%i", i); - adrstring = (char *)Cvar_VariableString(name); + adrstring = Cvar_VariableString(name); if (!adrstring || !adrstring[0]) { diff --git a/src/common/header/common.h b/src/common/header/common.h index b03ae9e2..e7e12806 100644 --- a/src/common/header/common.h +++ b/src/common/header/common.h @@ -531,7 +531,7 @@ qboolean NET_CompareAdr(netadr_t a, netadr_t b); qboolean NET_CompareBaseAdr(netadr_t a, netadr_t b); qboolean NET_IsLocalAddress(netadr_t adr); char *NET_AdrToString(netadr_t a); -qboolean NET_StringToAdr(char *s, netadr_t *a); +qboolean NET_StringToAdr(const char *s, netadr_t *a); void NET_Sleep(int msec); /*=================================================================== */