summaryrefslogtreecommitdiff
path: root/source3/include/smb.h
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1998-11-12 23:35:05 +0000
committerLuke Leighton <lkcl@samba.org>1998-11-12 23:35:05 +0000
commit2c7f6da1fa95ff77d6c60fcd109205847519434f (patch)
treed52fbd3a92e235ce15a1670efa30f8c0bea21a02 /source3/include/smb.h
parentc1bf51bd2c993c09c67ff003c6fba4edd5b350bd (diff)
downloadsamba-2c7f6da1fa95ff77d6c60fcd109205847519434f.tar.gz
samba-2c7f6da1fa95ff77d6c60fcd109205847519434f.tar.bz2
samba-2c7f6da1fa95ff77d6c60fcd109205847519434f.zip
security descriptors.
kanji const char* warnings. (This used to be commit 06abdfd68e1d7fa8741afc3f56ec7a13b5fa4ccc)
Diffstat (limited to 'source3/include/smb.h')
-rw-r--r--source3/include/smb.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/source3/include/smb.h b/source3/include/smb.h
index 47a8869a48..4f064d27d1 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -1655,7 +1655,13 @@ extern int unix_ERR_code;
#define ZERO_STRUCT(x) memset((char *)&(x), 0, sizeof(x))
/* zero a structure given a pointer to the structure */
-#define ZERO_STRUCTP(x) memset((char *)(x), 0, sizeof(*(x)))
+#if 0
+#define ZERO_STRUCTP(x) { }
+#else
+#define ZERO_STRUCTP(x) { if (x != NULL) memset((char *)(x), 0, sizeof(*(x))); }
+#endif
+
+#define ZERO_STRUCTPN(x) { if (x != NULL) ZERO_STRUCTP(x); }
/* zero an array - note that sizeof(array) must work - ie. it must not be a
pointer */