summaryrefslogtreecommitdiff
path: root/source3/include/smb.h
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1998-11-13 02:07:07 +0000
committerJeremy Allison <jra@samba.org>1998-11-13 02:07:07 +0000
commit2164685b9f959814af2067aa0dcac2d1b2ac0bc5 (patch)
treef8ebfac1cd4515f5de95d97e3b553f483669fd9e /source3/include/smb.h
parentcb265dbb8b73a177d9e7fd52e53f1eba487b94d4 (diff)
downloadsamba-2164685b9f959814af2067aa0dcac2d1b2ac0bc5.tar.gz
samba-2164685b9f959814af2067aa0dcac2d1b2ac0bc5.tar.bz2
samba-2164685b9f959814af2067aa0dcac2d1b2ac0bc5.zip
include/smb.h: Re-added zero pointer protection to ZERO_STRUCTP.
lib/util_sock.c: Added strerror() calls to getpeername failures (which seem to be giving IRIX trouble at the moment). rpc_parse/parse_sec.c: Changed use of ZERO_STRUCTPN to ZERO_STRUCTP which again does zero pointer protection. smbd/quotas.c: Fixed typo. Jeremy. (This used to be commit b62f008974c96e0302d6c146cf49bc2045bef005)
Diffstat (limited to 'source3/include/smb.h')
-rw-r--r--source3/include/smb.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/source3/include/smb.h b/source3/include/smb.h
index 9339cdda6f..bb055214ec 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -1655,9 +1655,7 @@ 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))); }
-
-#define ZERO_STRUCTPN(x) { if (x != NULL) ZERO_STRUCTP(x); }
+#define ZERO_STRUCTP(x) { if ((x) != NULL) memset((char *)(x), 0, sizeof(*(x))); }
/* zero an array - note that sizeof(array) must work - ie. it must not be a
pointer */