1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

librpc:ndr: Format sizes as ‘size_t’

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Joseph Sutton 2023-08-11 09:54:02 +12:00 committed by Andrew Bartlett
parent d35e7f10af
commit 44df47712a

View File

@ -476,13 +476,13 @@ enum ndr_compression_alg {
#define NDR_PULL_ALLOC_N(ndr, s, n) do { \
_NDR_PULL_FIX_CURRENT_MEM_CTX(ndr);\
(s) = talloc_array_ptrtype(ndr->current_mem_ctx, (s), n); \
if (unlikely(!(s))) return ndr_pull_error(ndr, NDR_ERR_ALLOC, "Alloc %u * %s failed: %s\n", (unsigned)n, # s, __location__); \
if (unlikely(!(s))) return ndr_pull_error(ndr, NDR_ERR_ALLOC, "Alloc %zu * %s failed: %s\n", (size_t)n, # s, __location__); \
} while (0)
#define NDR_PUSH_ALLOC_SIZE(ndr, s, size) do { \
(s) = talloc_array(ndr, uint8_t, size); \
if (unlikely(!(s))) return ndr_push_error(ndr, NDR_ERR_ALLOC, "push alloc %u failed: %s\n", (unsigned)size, __location__); \
if (unlikely(!(s))) return ndr_push_error(ndr, NDR_ERR_ALLOC, "push alloc %zu failed: %s\n", (size_t)size, __location__); \
} while (0)
#define NDR_PUSH_ALLOC(ndr, s) do { \