diff options
author | Jeremy Allison <jra@samba.org> | 1998-11-13 02:07:07 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 1998-11-13 02:07:07 +0000 |
commit | b62f008974c96e0302d6c146cf49bc2045bef005 (patch) | |
tree | 145fa2ee73dc0b11ef215bbc941ae89d4d086352 /source/include/smb.h | |
parent | 9412edfd4c11a26e4ef290839375e3959cf70a7e (diff) | |
download | samba-b62f008974c96e0302d6c146cf49bc2045bef005.tar.gz samba-b62f008974c96e0302d6c146cf49bc2045bef005.tar.xz samba-b62f008974c96e0302d6c146cf49bc2045bef005.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.
Diffstat (limited to 'source/include/smb.h')
-rw-r--r-- | source/include/smb.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/source/include/smb.h b/source/include/smb.h index 9339cdda6f0..bb055214ec5 100644 --- a/source/include/smb.h +++ b/source/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 */ |