r20839: Fix other C++ warnings
authorJelmer Vernooij <jelmer@samba.org>
Tue, 16 Jan 2007 18:26:02 +0000 (18:26 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:17:11 +0000 (12:17 -0500)
source/librpc/ndr/libndr.h
source/rpcclient/cmd_echo.c

index 6032185d21225261c8d4ef764c6c7cdbbfc8ecbd..32dd0ef6c59f3399938c4a23c66901325801927b 100644 (file)
@@ -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)
 
index 0a06a5c1664031a7e43cd417f627719ef2da67e2..81028dfb73922a53edbf567dc5f3cf2e63fecb03 100644 (file)
@@ -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))