From 203622b7340b6e3309ce73f0d51ea9712cb09768 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 16 Jan 2007 18:26:02 +0000 Subject: r20839: Fix other C++ warnings (This used to be commit d948d828d591b3467945f5a85a561ebb07299d9f) --- source3/librpc/ndr/libndr.h | 2 +- source3/rpcclient/cmd_echo.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source3/librpc/ndr/libndr.h b/source3/librpc/ndr/libndr.h index 6032185d21..32dd0ef6c5 100644 --- a/source3/librpc/ndr/libndr.h +++ b/source3/librpc/ndr/libndr.h @@ -274,7 +274,7 @@ enum ndr_compression_alg { #define NDR_PUSH_ALLOC_SIZE(ndr, s, size) do { \ - (s) = talloc_size(ndr, size); \ + (s) = talloc_array(ndr, uint8, size); \ if (!(s)) return ndr_push_error(ndr, NDR_ERR_ALLOC, "push alloc %u failed: %s\n", (unsigned)size, __location__); \ } while (0) diff --git a/source3/rpcclient/cmd_echo.c b/source3/rpcclient/cmd_echo.c index 0a06a5c166..81028dfb73 100644 --- a/source3/rpcclient/cmd_echo.c +++ b/source3/rpcclient/cmd_echo.c @@ -101,7 +101,7 @@ static NTSTATUS cmd_echo_source_data(struct rpc_pipe_client *cli, size = atoi(argv[1]); - out_data = SMB_MALLOC(size); + out_data = SMB_MALLOC_ARRAY(uint8, size); result = rpccli_echo_SourceData(cli, mem_ctx, size, out_data); if (!NT_STATUS_IS_OK(result)) -- cgit