replaced bzero with memset, because bzero is not ansi C standart - Patch by Pak21@users.sourceforge.net

origin
stpohle 22 years ago
parent 97d379a0fb
commit 6cb5275081

@ -1,4 +1,11 @@
$Id: ChangeLog,v 1.39 2003/08/29 23:50:39 stpohle Exp $
$Id: ChangeLog,v 1.40 2003/09/11 19:32:00 stpohle Exp $
- BomberCloneMServ will have even a playerlist of
a game, so you will know who have joined a game.
- added big endian support, so non intel-style
computers will be able to play over the network
now too.
- added liquid and moving bombs special.

@ -1,4 +1,4 @@
/* $Id: udp.c,v 1.9 2003/05/29 21:35:04 stpohle Exp $ */
/* $Id: udp.c,v 1.10 2003/09/11 19:32:01 stpohle Exp $ */
/* udp.c code for the network
File Version 0.2
*/
@ -24,10 +24,9 @@
#endif
#ifdef _WIN32
#define _sockaddr sockaddr
#define bzero(a,b) memset(a,'\0',b)
#define _sockaddr sockaddr
#else
#define _sockaddr sockaddr_in6
#define _sockaddr sockaddr_in6
#endif
extern char *dns_net_getip (char *host);
@ -97,8 +96,8 @@ dns_filladdr (char *host, int hostlen, char *port, int portlen, int ai_family,
else
addrlen = sizeof (struct sockaddr_in6);
bzero (host, hostlen);
bzero (port, portlen);
memset (host, '\0', hostlen);
memset (port, '\0', portlen);
if ((err =
getnameinfo ((struct sockaddr *) sAddr, addrlen, host, hostlen, port, portlen,
@ -116,7 +115,7 @@ dns_filladdr (char *host, int hostlen, char *port, int portlen, int ai_family,
else {
/* we have to complete the sAddr struct */
bzero (&hints, sizeof (struct addrinfo));
memset (&hints, '\0', sizeof (struct addrinfo));
hints.ai_family = ai_family;
hints.ai_socktype = SOCK_DGRAM;
@ -187,7 +186,7 @@ udp_server (char *port, int ai_family)
sock,
ai_family_;
bzero (&hints, sizeof (struct addrinfo));
memset (&hints, '\0', sizeof (struct addrinfo));
hints.ai_flags = AI_PASSIVE;
hints.ai_family = ai_family;
@ -261,7 +260,7 @@ udp_get (int sock, char *text, int len, struct _sockaddr *sAddr, int ai_family)
clen = sizeof (struct sockaddr_in6);
#endif
bzero (text, len);
memset (text, '\0', len);
// check if we have got any data
FD_ZERO (&sockset);

Loading…
Cancel
Save