summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2007-05-07 15:07:49 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:21:54 -0500
commit71921605995fa95d84301534760a6bc2db3fa74b (patch)
tree58676f522882b36e188e2e689b10d6e63f447037 /source3/smbd
parentb1e866c3b7c2ef92599b5801ac8c174cfd404319 (diff)
downloadsamba-71921605995fa95d84301534760a6bc2db3fa74b.tar.gz
samba-71921605995fa95d84301534760a6bc2db3fa74b.tar.bz2
samba-71921605995fa95d84301534760a6bc2db3fa74b.zip
r22747: Fix some C++ warnings
(This used to be commit a66a04e9f11f6c4462f2b56b447bae4eca7b177c)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/seal.c9
-rw-r--r--source3/smbd/sesssetup.c3
2 files changed, 4 insertions, 8 deletions
diff --git a/source3/smbd/seal.c b/source3/smbd/seal.c
index 07ef186e2e..c4d60b0a60 100644
--- a/source3/smbd/seal.c
+++ b/source3/smbd/seal.c
@@ -492,8 +492,7 @@ static NTSTATUS srv_enc_spnego_negotiate(connection_struct *conn,
if (NT_STATUS_IS_OK(status)) {
/* Return the context we're using for this encryption state. */
- *pparam = SMB_MALLOC(2);
- if (!*pparam) {
+ if (!(*pparam = SMB_MALLOC_ARRAY(unsigned char, 2))) {
return NT_STATUS_NO_MEMORY;
}
SSVAL(*pparam,0,partial_srv_trans_enc_ctx->es->enc_ctx_num);
@@ -542,8 +541,7 @@ static NTSTATUS srv_enc_spnego_ntlm_auth(connection_struct *conn,
if (NT_STATUS_IS_OK(status)) {
/* Return the context we're using for this encryption state. */
- *pparam = SMB_MALLOC(2);
- if (!*pparam) {
+ if (!(*pparam = SMB_MALLOC_ARRAY(unsigned char, 2))) {
return NT_STATUS_NO_MEMORY;
}
SSVAL(*pparam,0,ec->es->enc_ctx_num);
@@ -593,8 +591,7 @@ static NTSTATUS srv_enc_raw_ntlm_auth(connection_struct *conn,
if (NT_STATUS_IS_OK(status)) {
/* Return the context we're using for this encryption state. */
- *pparam = SMB_MALLOC(2);
- if (!*pparam) {
+ if (!(*pparam = SMB_MALLOC_ARRAY(unsigned char, 2))) {
return NT_STATUS_NO_MEMORY;
}
SSVAL(*pparam,0,ec->es->enc_ctx_num);
diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c
index 188b7bfb81..7dbf20a189 100644
--- a/source3/smbd/sesssetup.c
+++ b/source3/smbd/sesssetup.c
@@ -990,8 +990,7 @@ static NTSTATUS check_spnego_blob_complete(uint16 smbpid, uint16 vuid, DATA_BLOB
}
/* We must store this blob until complete. */
- pad = SMB_MALLOC(sizeof(struct pending_auth_data));
- if (!pad) {
+ if (!(pad = SMB_MALLOC_P(struct pending_auth_data))) {
return NT_STATUS_NO_MEMORY;
}
pad->needed_len = needed_len - pblob->length;