svn commit: samba r10524 - in
branches/SAMBA_4_0/source/lib/tdb/common: .
tridge at samba.org
tridge at samba.org
Tue Sep 27 03:09:38 GMT 2005
Author: tridge
Date: 2005-09-27 03:09:38 +0000 (Tue, 27 Sep 2005)
New Revision: 10524
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=10524
Log:
SAFE_FREE() in tdb does not need the discard_const_p()
the discard_const_p() was causing problems on openbsd where intptr_t is not defined
Modified:
branches/SAMBA_4_0/source/lib/tdb/common/tdb_private.h
Changeset:
Modified: branches/SAMBA_4_0/source/lib/tdb/common/tdb_private.h
===================================================================
--- branches/SAMBA_4_0/source/lib/tdb/common/tdb_private.h 2005-09-27 02:36:56 UTC (rev 10523)
+++ branches/SAMBA_4_0/source/lib/tdb/common/tdb_private.h 2005-09-27 03:09:38 UTC (rev 10524)
@@ -115,18 +115,9 @@
#define MAP_FAILED ((void *)-1)
#endif
-#ifndef discard_const_p
-# if defined(__intptr_t_defined) || defined(HAVE_INTPTR_T)
-# define discard_const(ptr) ((void *)((intptr_t)(ptr)))
-# else
-# define discard_const(ptr) ((void *)(ptr))
-# endif
-# define discard_const_p(type, ptr) ((type *)discard_const(ptr))
-#endif
-
/* free memory if the pointer is valid and zero the pointer */
#ifndef SAFE_FREE
-#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
#define BUCKET(hash) ((hash) % tdb->header.hash_size)
More information about the samba-cvs
mailing list