X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=libs%2Fl_net%2Fl_net.c;h=fa7b31f486a7c571c12f994bdfebc4bb4528a622;hb=83113718a4fb6a8e2318841f16f8a0b0eb85675c;hp=caf6c4228d9aff64d892d2d21779ca61b1f2516c;hpb=e4287c28bb2dafedc81c66e63951d947cfbeb225;p=xonotic%2Fnetradiant.git diff --git a/libs/l_net/l_net.c b/libs/l_net/l_net.c index caf6c422..fa7b31f4 100644 --- a/libs/l_net/l_net.c +++ b/libs/l_net/l_net.c @@ -36,12 +36,6 @@ #include "l_net.h" #include "l_net_wins.h" -#define GetMemory malloc -#define FreeMemory free - -#define qtrue 1 -#define qfalse 0 - #ifdef _DEBUG void WinPrint( const char *str, ... ){ va_list argptr; @@ -51,7 +45,7 @@ void WinPrint( const char *str, ... ){ vsprintf( text, str, argptr ); va_end( argptr ); - printf( text ); + printf( "%s", text ); } #else void WinPrint( const char *str, ... ){ @@ -183,7 +177,7 @@ int Net_Receive( socket_t *sock, netmessage_t *msg ){ socket_t *Net_AllocSocket( void ){ socket_t *sock; - sock = (socket_t *) GetMemory( sizeof( socket_t ) ); + sock = (socket_t *) malloc( sizeof( socket_t ) ); memset( sock, 0, sizeof( socket_t ) ); return sock; } //end of the function Net_AllocSocket @@ -194,7 +188,7 @@ socket_t *Net_AllocSocket( void ){ // Changes Globals: - //=========================================================================== void Net_FreeSocket( socket_t *sock ){ - FreeMemory( sock ); + free( sock ); } //end of the function Net_FreeSocket //=========================================================================== //