From a66a04e9f11f6c4462f2b56b447bae4eca7b177c Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Mon, 7 May 2007 15:07:49 +0000 Subject: r22747: Fix some C++ warnings --- source/smbd/seal.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'source/smbd/seal.c') 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); -- cgit