summaryrefslogtreecommitdiffstats
path: root/source/include/smb.h
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1998-11-13 21:41:01 +0000
committerJeremy Allison <jra@samba.org>1998-11-13 21:41:01 +0000
commit4c2b5a00983501e5d4aad1456ba8b5ab0dfd9b4c (patch)
treef50b790798e338298a170bf40a92f90fe84a43d1 /source/include/smb.h
parent24b2bf1741366045eca02cbd09e3283531d28422 (diff)
downloadsamba-4c2b5a00983501e5d4aad1456ba8b5ab0dfd9b4c.tar.gz
samba-4c2b5a00983501e5d4aad1456ba8b5ab0dfd9b4c.tar.xz
samba-4c2b5a00983501e5d4aad1456ba8b5ab0dfd9b4c.zip
Makefile.in configure configure.in include/config.h.in: Changes for DGUX and UNIXWARE.
groupdb/aliasdb.c groupdb/aliasfile.c groupdb/groupfile.c: Don't use snprinf, use slprintf. include/includes.h: Fix YP problem. include/smb.h: Fix ZERO_STRUCTP. lib/util_sock.c: Added strerror() in debugs. passdb/ldap.c: Don't use snprinf, use slprintf. rpc_client/cli_lsarpc.c rpc_client/cli_pipe.c rpc_parse/parse_sec.c rpc_server/srv_pipe.c: Don't use snprinf, use slprintf. script/installman.sh: DGUX changes. smbd/open.c smbd/oplock.c: Fixed gcc warnings. web/swat.c: Changes USER to SWAT_USER.
Diffstat (limited to 'source/include/smb.h')
-rw-r--r--source/include/smb.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/include/smb.h b/source/include/smb.h
index bb055214ec5..e94d45bf074 100644
--- a/source/include/smb.h
+++ b/source/include/smb.h
@@ -1654,8 +1654,11 @@ extern int unix_ERR_code;
/* zero a structure */
#define ZERO_STRUCT(x) memset((char *)&(x), 0, sizeof(x))
+/* zero a structure given a pointer to the structure - no zero check */
+#define ZERO_STRUCTPN(x) memset((char *)(x), 0, sizeof(*(x)))
+
/* zero a structure given a pointer to the structure */
-#define ZERO_STRUCTP(x) { if ((x) != NULL) memset((char *)(x), 0, sizeof(*(x))); }
+#define ZERO_STRUCTP(x) { if ((x) != NULL) ZERO_STRUCTPN(x); }
/* zero an array - note that sizeof(array) must work - ie. it must not be a
pointer */