summaryrefslogtreecommitdiffstats
path: root/source/smbd/seal.c
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
commita66a04e9f11f6c4462f2b56b447bae4eca7b177c (patch)
tree3e13993827ca64a6836ef241607464effa195a4d /source/smbd/seal.c
parenta99ab3a2ed44522054175f03b60e63fa05a0378a (diff)
downloadsamba-a66a04e9f11f6c4462f2b56b447bae4eca7b177c.tar.gz
samba-a66a04e9f11f6c4462f2b56b447bae4eca7b177c.tar.xz
samba-a66a04e9f11f6c4462f2b56b447bae4eca7b177c.zip
r22747: Fix some C++ warnings
Diffstat (limited to 'source/smbd/seal.c')
-rw-r--r--source/smbd/seal.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/source/smbd/seal.c b/source/smbd/seal.c
index 07ef186e2ed..c4d60b0a60b 100644
--- a/source/smbd/seal.c
+++ b/source/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);