From: Thomas Debesse Date: Tue, 14 Jan 2020 05:12:06 +0000 (+0100) Subject: unnecessary SAFE_MALLOC ifdef: always defined X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=5217679e3fb04968ed2ef8c19e41554fa7f11072;p=xonotic%2Fnetradiant.git unnecessary SAFE_MALLOC ifdef: always defined --- diff --git a/tools/heretic2/common/cmdlib.c b/tools/heretic2/common/cmdlib.c index c45ff161..0f9ce0d5 100644 --- a/tools/heretic2/common/cmdlib.c +++ b/tools/heretic2/common/cmdlib.c @@ -50,8 +50,6 @@ qboolean g_dokeypress = false; qboolean g_nomkdir = false; - -#ifdef SAFE_MALLOC void *safe_malloc( size_t size ){ void *p; @@ -73,7 +71,6 @@ void *safe_malloc_info( size_t size, char* info ){ return p; } -#endif // !SAFE_MALLOC void *SafeMalloc( size_t n, char *desc ){ void *p; diff --git a/tools/heretic2/common/cmdlib.h b/tools/heretic2/common/cmdlib.h index b8b1aa3d..f3624d6b 100644 --- a/tools/heretic2/common/cmdlib.h +++ b/tools/heretic2/common/cmdlib.h @@ -73,13 +73,8 @@ // the dec offsetof macro doesnt work very well... #define myoffsetof( type,identifier ) ( (size_t)& ( (type *)0 )->identifier ) -#define SAFE_MALLOC -#ifdef SAFE_MALLOC void *safe_malloc( size_t size ); void *safe_malloc_info( size_t size, char* info ); -#else -#define safe_malloc( a ) malloc( a ) -#endif /* SAFE_MALLOC */ // set these before calling CheckParm extern int myargc; diff --git a/tools/quake2/common/cmdlib.c b/tools/quake2/common/cmdlib.c index 5063f739..506d7a2f 100644 --- a/tools/quake2/common/cmdlib.c +++ b/tools/quake2/common/cmdlib.c @@ -46,7 +46,6 @@ // qboolean verbose = false; -#ifdef SAFE_MALLOC void *safe_malloc( size_t size ){ void *p; @@ -70,7 +69,6 @@ void *safe_malloc_info( size_t size, char* info ){ memset( p, 0, size ); return p; } -#endif // set these before calling CheckParm int myargc; diff --git a/tools/quake2/common/cmdlib.h b/tools/quake2/common/cmdlib.h index f8d8e0d3..49f1aeb1 100644 --- a/tools/quake2/common/cmdlib.h +++ b/tools/quake2/common/cmdlib.h @@ -70,13 +70,8 @@ typedef unsigned char byte; // the dec offsetof macro doesnt work very well... #define myoffsetof( type,identifier ) ( (size_t)& ( (type *)0 )->identifier ) -#define SAFE_MALLOC -#ifdef SAFE_MALLOC void *safe_malloc( size_t size ); void *safe_malloc_info( size_t size, char* info ); -#else -#define safe_malloc( a ) malloc( a ) -#endif /* SAFE_MALLOC */ // set these before calling CheckParm extern int myargc; diff --git a/tools/quake3/common/cmdlib.c b/tools/quake3/common/cmdlib.c index 90174e36..32cf7fc0 100644 --- a/tools/quake3/common/cmdlib.c +++ b/tools/quake3/common/cmdlib.c @@ -47,7 +47,6 @@ #define BASEDIRNAME "quake" // assumed to have a 2 or 3 following #define PATHSEPERATOR '/' -#ifdef SAFE_MALLOC void *safe_malloc( size_t size ){ void *p; @@ -69,7 +68,6 @@ void *safe_malloc_info( size_t size, char* info ){ return p; } -#endif // !SAFE_MALLOC // set these before calling CheckParm int myargc; diff --git a/tools/quake3/common/cmdlib.h b/tools/quake3/common/cmdlib.h index b57c81a9..b49e49c2 100644 --- a/tools/quake3/common/cmdlib.h +++ b/tools/quake3/common/cmdlib.h @@ -64,13 +64,8 @@ // the dec offsetof macro doesnt work very well... #define myoffsetof( type,identifier ) ( (size_t)& ( (type *)0 )->identifier ) -#define SAFE_MALLOC -#ifdef SAFE_MALLOC void *safe_malloc( size_t size ); void *safe_malloc_info( size_t size, char* info ); -#else -#define safe_malloc( a ) malloc( a ) -#endif /* SAFE_MALLOC */ // set these before calling CheckParm extern int myargc;