diff options
author | Martin Pool <mbp@samba.org> | 2002-01-03 07:49:07 +0000 |
---|---|---|
committer | Martin Pool <mbp@samba.org> | 2002-01-03 07:49:07 +0000 |
commit | 269a7d3c9ba8ca1444653c1aa56b843b8b1df08b (patch) | |
tree | 843a4456298cba2b07d21347f893040d172c288c /source/include | |
parent | 8f343beae7455141ce6a5e27e46ed2970aed8e7f (diff) | |
download | samba-269a7d3c9ba8ca1444653c1aa56b843b8b1df08b.tar.gz samba-269a7d3c9ba8ca1444653c1aa56b843b8b1df08b.tar.xz samba-269a7d3c9ba8ca1444653c1aa56b843b8b1df08b.zip |
Clarify doc for SAFE_FREE.
Diffstat (limited to 'source/include')
-rw-r--r-- | source/include/smb_macros.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/source/include/smb_macros.h b/source/include/smb_macros.h index de6f1dc3baf..2b5be96e7fb 100644 --- a/source/include/smb_macros.h +++ b/source/include/smb_macros.h @@ -1,6 +1,5 @@ /* Unix SMB/Netbios implementation. - Version 1.9. SMB parameters and setup Copyright (C) Andrew Tridgell 1992-1999 Copyright (C) John H Terpstra 1996-1999 @@ -37,9 +36,14 @@ #define IS_DOS_SYSTEM(test_mode) (((test_mode) & aSYSTEM) != 0) #define IS_DOS_HIDDEN(test_mode) (((test_mode) & aHIDDEN) != 0) -/* free memory if the pointer is valid and zero the pointer */ - #ifndef SAFE_FREE /* Oh no this is also defined in tdb.h */ + +/** + * Free memory if the pointer and zero the pointer. + * + * @note You are explicitly allowed to pass NULL pointers -- they will + * always be ignored. + **/ #define SAFE_FREE(x) do { if ((x) != NULL) {free(x); x=NULL;} } while(0) #endif |