summaryrefslogtreecommitdiff
path: root/source4/lib/util
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-04-17 08:03:01 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:50:59 -0500
commit4047b20c368f473081eeb951dff119a6c060c9f7 (patch)
treea48de3ebba42464dc7ba5819f92cc382fbea7460 /source4/lib/util
parent3eb286b52a30f126c53fd3d9688c51586f7b73ad (diff)
downloadsamba-4047b20c368f473081eeb951dff119a6c060c9f7.tar.gz
samba-4047b20c368f473081eeb951dff119a6c060c9f7.tar.bz2
samba-4047b20c368f473081eeb951dff119a6c060c9f7.zip
r22297: move ZERO_*, ARRAY_SIZE and PTR_DIFF macros into libreplace
metze (This used to be commit b69c950858d837d7bd734d418129ade69106a00d)
Diffstat (limited to 'source4/lib/util')
-rw-r--r--source4/lib/util/util.h25
1 files changed, 0 insertions, 25 deletions
diff --git a/source4/lib/util/util.h b/source4/lib/util/util.h
index dd6c1499bd..cfd77e5a13 100644
--- a/source4/lib/util/util.h
+++ b/source4/lib/util/util.h
@@ -41,31 +41,6 @@ extern const char *panic_action;
#include "util/byteorder.h"
#include "lib/util/util_proto.h"
-/**
- * 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)))
-
-/**
- * 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
*/