mirror of
https://github.com/samba-team/samba.git
synced 2025-12-16 00:23:52 +03:00
Welcome to preprocessor hell. Had to put a #ifndef around SAFE_FREE to
stop smb_macros.h and tdb.h from fighting with each other. I tried to rearrange the #include file order but that breaks other stuff. Aargh!
This commit is contained in:
@@ -38,7 +38,10 @@
|
|||||||
#define IS_DOS_HIDDEN(test_mode) (((test_mode) & aHIDDEN) != 0)
|
#define IS_DOS_HIDDEN(test_mode) (((test_mode) & aHIDDEN) != 0)
|
||||||
|
|
||||||
/* free memory if the pointer is valid and zero the pointer */
|
/* free memory if the pointer is valid and zero the pointer */
|
||||||
|
|
||||||
|
#ifndef SAFE_FREE /* Oh no this is also defined in tdb.h */
|
||||||
#define SAFE_FREE(x) do { if ((x) != NULL) {free(x); x=NULL;} } while(0)
|
#define SAFE_FREE(x) do { if ((x) != NULL) {free(x); x=NULL;} } while(0)
|
||||||
|
#endif
|
||||||
|
|
||||||
/* zero a structure */
|
/* zero a structure */
|
||||||
#define ZERO_STRUCT(x) memset((char *)&(x), 0, sizeof(x))
|
#define ZERO_STRUCT(x) memset((char *)&(x), 0, sizeof(x))
|
||||||
|
|||||||
Reference in New Issue
Block a user