From ced138b578b0c006cdee3f40b069b6f1f63a0068 Mon Sep 17 00:00:00 2001 From: terminx Date: Thu, 17 Apr 2014 19:58:31 +0000 Subject: [PATCH] Move DO_FREE_AND_NULL macro to compat.h git-svn-id: https://svn.eduke32.com/eduke32@4442 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/build/include/compat.h | 4 ++++ polymer/eduke32/build/src/engine.c | 5 ----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/polymer/eduke32/build/include/compat.h b/polymer/eduke32/build/include/compat.h index 75f7f03ac..891f5a17f 100644 --- a/polymer/eduke32/build/include/compat.h +++ b/polymer/eduke32/build/include/compat.h @@ -779,6 +779,10 @@ static inline void append_ext_UNSAFE(char *outbuf, const char *ext) } #endif +#define DO_FREE_AND_NULL(var) do { \ + if (var != NULL) { Bfree(var); var = NULL; } \ +} while (0) + #define MAYBE_FCLOSE_AND_NULL(fileptr) do { \ if (fileptr) { Bfclose(fileptr); fileptr=NULL; } \ } while (0) diff --git a/polymer/eduke32/build/src/engine.c b/polymer/eduke32/build/src/engine.c index fcd27f7fd..eb92b5652 100644 --- a/polymer/eduke32/build/src/engine.c +++ b/polymer/eduke32/build/src/engine.c @@ -8889,11 +8889,6 @@ int32_t initengine(void) return 0; } - -#define DO_FREE_AND_NULL(var) do { \ - if (var != NULL) { Bfree(var); var = NULL; } \ -} while (0) - // // uninitengine //