lib/util: remove implicit discard_const_p() from SAFE_FREE()
authorStefan Metzmacher <metze@samba.org>
Sat, 28 Aug 2010 06:38:48 +0000 (08:38 +0200)
committerStefan 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

index cfc13ab8360c2aec6f33a7192bd5156183b9e381..099dfbb694eca521e0fced42f914e3471c5c9a44 100644 (file)
@@ -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
 
 /**