Move DO_FREE_AND_NULL macro to compat.h

git-svn-id: https://svn.eduke32.com/eduke32@4442 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2014-04-17 19:58:31 +00:00
parent a33f9c2ca1
commit ced138b578
2 changed files with 4 additions and 5 deletions

View file

@ -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)

View file

@ -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
//