summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-04-17 08:03:29 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:19:24 -0500
commita8c62502741fe287091cc9001b69fbd7496e3562 (patch)
tree6bb0fe3d00b6c12f299728943a8a22e6c74250fb /source3/include
parent2da54a66b970917ca5290001af0f4ab7adf68460 (diff)
downloadsamba-a8c62502741fe287091cc9001b69fbd7496e3562.tar.gz
samba-a8c62502741fe287091cc9001b69fbd7496e3562.tar.bz2
samba-a8c62502741fe287091cc9001b69fbd7496e3562.zip
r22298: move ZERO_*, ARRAY_SIZE and PTR_DIFF macros into libreplace
metze (This used to be commit 8a7d2e633b98aa9c73cf1f7d1369015b294cf2e1)
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/smb_macros.h19
1 files changed, 0 insertions, 19 deletions
diff --git a/source3/include/smb_macros.h b/source3/include/smb_macros.h
index d696db3d3a..2b596d3c6b 100644
--- a/source3/include/smb_macros.h
+++ b/source3/include/smb_macros.h
@@ -46,25 +46,6 @@
#define SAFE_FREE(x) do { if ((x) != NULL) {free(x); x=NULL;} } while(0)
#endif
-/* zero a structure */
-#define ZERO_STRUCT(x) memset((char *)&(x), 0, sizeof(x))
-
-/* zero a structure given a pointer to the structure */
-#define ZERO_STRUCTP(x) do { if ((x) != NULL) memset((char *)(x), 0, sizeof(*(x))); } while(0)
-
-/* zero a structure given a pointer to the structure - no zero check */
-#define ZERO_STRUCTPN(x) memset((char *)(x), 0, sizeof(*(x)))
-
-/* zero an array - note that sizeof(array) must work - ie. it must not be a
- pointer */
-#define ZERO_ARRAY(x) memset((char *)(x), 0, sizeof(x))
-
-/* pointer difference macro */
-#define PTR_DIFF(p1,p2) ((ptrdiff_t)(((const char *)(p1)) - (const char *)(p2)))
-
-/* work out how many elements there are in a static array */
-#define ARRAY_SIZE(a) (sizeof(a)/sizeof(a[0]))
-
/* assert macros */
#ifdef DEVELOPER
#define SMB_ASSERT(b) ( (b) ? (void)0 : \