Rev 4992: Fix other C++ warnings in file:///home/jelmer/bzr.samba/SAMBA_3_0/

Jelmer Vernooij jelmer at samba.org
Tue Jan 16 18:23:59 GMT 2007


------------------------------------------------------------
revno: 4992
revision-id: jelmer at samba.org-20070116182350-dq986bj4yj3m4s12
parent: svn-v2:20838 at 0c0555d6-39d7-0310-84fc-f1cc0bd64818-branches%2fSAMBA_3_0
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: SAMBA_3_0
timestamp: Tue 2007-01-16 19:23:50 +0100
message:
  Fix other C++ warnings
modified:
  source/librpc/ndr/libndr.h     svn-v2:18193 at 0c0555d6-39d7-0310-84fc-f1cc0bd64818-branches%2fSAMBA_3_0-source%2flibrpc%2fndr%2flibndr.h
  source/rpcclient/cmd_echo.c    svn-v2:2 at 0c0555d6-39d7-0310-84fc-f1cc0bd64818-trunk-source%2frpcclient%2fcmd_echo.c
=== modified file 'source/librpc/ndr/libndr.h'
--- a/source/librpc/ndr/libndr.h	2006-09-18 20:41:45 +0000
+++ b/source/librpc/ndr/libndr.h	2007-01-16 18:23:50 +0000
@@ -274,7 +274,7 @@
 
 
 #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)
 

=== modified file 'source/rpcclient/cmd_echo.c'
--- a/source/rpcclient/cmd_echo.c	2007-01-16 15:42:03 +0000
+++ b/source/rpcclient/cmd_echo.c	2007-01-16 18:23:50 +0000
@@ -101,7 +101,7 @@
 
 	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))



More information about the samba-cvs mailing list