summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Pool <mbp@samba.org>2002-01-03 07:49:07 +0000
committerMartin Pool <mbp@samba.org>2002-01-03 07:49:07 +0000
commit092f962b9ca33c932b2dc852938d2233b0eff4ca (patch)
tree89e4efd5c39dd3673c67a1adbe3705ca6c4ab25d
parent8f88157dcecbecc149381b520c3724d5c080726e (diff)
downloadsamba-092f962b9ca33c932b2dc852938d2233b0eff4ca.tar.gz
samba-092f962b9ca33c932b2dc852938d2233b0eff4ca.tar.bz2
samba-092f962b9ca33c932b2dc852938d2233b0eff4ca.zip
Clarify doc for SAFE_FREE.
(This used to be commit 269a7d3c9ba8ca1444653c1aa56b843b8b1df08b)
-rw-r--r--source3/include/smb_macros.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/source3/include/smb_macros.h b/source3/include/smb_macros.h
index de6f1dc3ba..2b5be96e7f 100644
--- a/source3/include/smb_macros.h
+++ b/source3/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