]> de.git.xonotic.org Git - xonotic/netradiant.git/commitdiff
unnecessary SAFE_MALLOC ifdef: always defined
authorThomas Debesse <dev@illwieckz.net>
Tue, 14 Jan 2020 05:12:06 +0000 (06:12 +0100)
committerThomas Debesse <dev@illwieckz.net>
Mon, 20 Jan 2020 19:56:04 +0000 (20:56 +0100)
tools/heretic2/common/cmdlib.c
tools/heretic2/common/cmdlib.h
tools/quake2/common/cmdlib.c
tools/quake2/common/cmdlib.h
tools/quake3/common/cmdlib.c
tools/quake3/common/cmdlib.h

index c45ff161bf0232491c73745c8b9e171ec925ff5b..0f9ce0d5ae20ef17ad97f11d033e2e3821311b30 100644 (file)
@@ -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;
index b8b1aa3da84b498cf46d6aa0e2d34d2ac5b40797..f3624d6b5152df9ddfa3fd70cfe73b1dcf9a791c 100644 (file)
 // 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;
index 5063f739e7a36b08a8f086574326919bbda0772e..506d7a2f16f16c5c6300ac34de5458bab004808a 100644 (file)
@@ -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;
index f8d8e0d361a415c2e4996fd651a0cad789393e79..49f1aeb109037b84a3585bb4559788939ede5db4 100644 (file)
@@ -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;
index 90174e36b6cf18f8d74ea26a0ec5158d262cd7f5..32cf7fc0f41307253fd0b1b6a84a7c67bc634126 100644 (file)
@@ -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;
index b57c81a9e760bef4c87512081236027c2740698b..b49e49c2e4f37e4d264af4baf16ebf099cdd173d 100644 (file)
 // 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;