From 93b64f3ca6ceb57a7b0aa9889e29240e35b9957b Mon Sep 17 00:00:00 2001 From: havoc Date: Tue, 24 Sep 2002 22:17:31 +0000 Subject: [PATCH] fix warnings git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@2437 d7cf8633-e32d-0410-b094-e92efae38249 --- net_udp.c | 6 +++--- net_udp.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/net_udp.c b/net_udp.c index 2ec8e9ce..baf0ac4a 100644 --- a/net_udp.c +++ b/net_udp.c @@ -318,7 +318,7 @@ int UDP_Write (int socket, qbyte *buf, int len, struct qsockaddr *addr) //============================================================================= -char *UDP_AddrToString (struct qsockaddr *addr) +char *UDP_AddrToString (const struct qsockaddr *addr) { static char buffer[22]; int haddr; @@ -363,7 +363,7 @@ int UDP_GetSocketAddr (int socket, struct qsockaddr *addr) //============================================================================= -int UDP_GetNameFromAddr (struct qsockaddr *addr, char *name) +int UDP_GetNameFromAddr (const struct qsockaddr *addr, char *name) { struct hostent *hostentry; @@ -400,7 +400,7 @@ int UDP_GetAddrFromName(const char *name, struct qsockaddr *addr) //============================================================================= -int UDP_AddrCompare (struct qsockaddr *addr1, struct qsockaddr *addr2) +int UDP_AddrCompare (const struct qsockaddr *addr1, const struct qsockaddr *addr2) { if (addr1->sa_family != addr2->sa_family) return -1; diff --git a/net_udp.h b/net_udp.h index 1210e721..dbd66639 100644 --- a/net_udp.h +++ b/net_udp.h @@ -34,12 +34,12 @@ int UDP_Send (qbyte *buf, int len, struct qsockaddr *addr); int UDP_Read (int socket, qbyte *buf, int len, struct qsockaddr *addr); int UDP_Write (int socket, qbyte *buf, int len, struct qsockaddr *addr); int UDP_Broadcast (int socket, qbyte *buf, int len); -char *UDP_AddrToString (struct qsockaddr *addr); +char *UDP_AddrToString (const struct qsockaddr *addr); int UDP_StringToAddr (const char *string, struct qsockaddr *addr); int UDP_GetSocketAddr (int socket, struct qsockaddr *addr); -int UDP_GetNameFromAddr (struct qsockaddr *addr, char *name); +int UDP_GetNameFromAddr (const struct qsockaddr *addr, char *name); int UDP_GetAddrFromName (const char *name, struct qsockaddr *addr); -int UDP_AddrCompare (struct qsockaddr *addr1, struct qsockaddr *addr2); +int UDP_AddrCompare (const struct qsockaddr *addr1, const struct qsockaddr *addr2); int UDP_GetSocketPort (struct qsockaddr *addr); int UDP_SetSocketPort (struct qsockaddr *addr, int port); -- 2.39.2