diff options
Diffstat (limited to 'lib/tdr')
-rw-r--r-- | lib/tdr/tdr.c | 10 | ||||
-rw-r--r-- | lib/tdr/tdr.h | 2 |
2 files changed, 11 insertions, 1 deletions
diff --git a/lib/tdr/tdr.c b/lib/tdr/tdr.c index 293436ed5e..ce67003f8b 100644 --- a/lib/tdr/tdr.c +++ b/lib/tdr/tdr.c @@ -92,6 +92,11 @@ NTSTATUS tdr_pull_uint16(struct tdr_pull *tdr, TALLOC_CTX *ctx, uint16_t *v) return NT_STATUS_OK; } +NTSTATUS tdr_pull_uint1632(struct tdr_pull *tdr, TALLOC_CTX *ctx, uint16_t *v) +{ + return tdr_pull_uint16(tdr, ctx, v); +} + NTSTATUS tdr_push_uint16(struct tdr_push *tdr, const uint16_t *v) { TDR_PUSH_NEED_BYTES(tdr, 2); @@ -100,6 +105,11 @@ NTSTATUS tdr_push_uint16(struct tdr_push *tdr, const uint16_t *v) return NT_STATUS_OK; } +NTSTATUS tdr_push_uint1632(struct tdr_push *tdr, const uint16_t *v) +{ + return tdr_push_uint16(tdr, v); +} + NTSTATUS tdr_print_uint16(struct tdr_print *tdr, const char *name, uint16_t *v) { tdr->print(tdr, "%-25s: 0x%02x (%u)", name, *v, *v); diff --git a/lib/tdr/tdr.h b/lib/tdr/tdr.h index 1eedc580d5..84f3e50c2b 100644 --- a/lib/tdr/tdr.h +++ b/lib/tdr/tdr.h @@ -55,7 +55,7 @@ struct tdr_print { } while (0) #define TDR_ALLOC(ctx, s, n) do { \ - (s) = talloc_array_size(ctx, sizeof(*(s)), n); \ + (s) = talloc_array_ptrtype(ctx, (s), n); \ if ((n) && !(s)) return NT_STATUS_NO_MEMORY; \ } while (0) |