git.samba.org
/
sfrench
/
samba-autobuild
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
db6d1c6
)
lib/util: remove implicit discard_const_p() from SAFE_FREE()
author
Stefan Metzmacher
<metze@samba.org>
Sat, 28 Aug 2010 06:38:48 +0000
(08:38 +0200)
committer
Stefan Metzmacher
<metze@samba.org>
Sat, 28 Aug 2010 06:41:00 +0000
(08:41 +0200)
This should fix a lot of warnings on IRIX.
If callers know what they're doing they can use discard_const_p()
on their own.
metze
lib/util/memory.h
patch
|
blob
|
history
diff --git
a/lib/util/memory.h
b/lib/util/memory.h
index cfc13ab8360c2aec6f33a7192bd5156183b9e381..099dfbb694eca521e0fced42f914e3471c5c9a44 100644
(file)
--- a/
lib/util/memory.h
+++ b/
lib/util/memory.h
@@
-28,7
+28,7
@@
* @note You are explicitly allowed to pass NULL pointers -- they will
* always be ignored.
**/
-#define SAFE_FREE(x) do { if ((x) != NULL) {free(
discard_const_p(void *, (x))
); (x)=NULL;} } while(0)
+#define SAFE_FREE(x) do { if ((x) != NULL) {free(
x
); (x)=NULL;} } while(0)
#endif
/**