diff options
author | Andrew Bartlett <abartlet@samba.org> | 2019-11-27 15:20:32 +1300 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2019-12-12 02:30:41 +0000 |
commit | d30c377d8c4e8a83b2722b771aa72d219eb69b46 (patch) | |
tree | 5eb48efb66e8bcec8541d24fe4cda780b4cf910f | |
parent | a44717394df9dc14a87eb2b9b8d23e2532e6f4c9 (diff) | |
download | samba-d30c377d8c4e8a83b2722b771aa72d219eb69b46.tar.gz |
librpc/ndr: Remove ndr_{push,pull}_get_switch_value()
By removing this we know we do not need to worry about this list
growing without bounds. We merge this into the recently created but
not yet released ABI 1.0.0
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13876
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
-rw-r--r-- | librpc/ABI/ndr-1.0.0.sigs | 2 | ||||
-rw-r--r-- | librpc/ndr/libndr.h | 2 | ||||
-rw-r--r-- | librpc/ndr/ndr.c | 13 |
3 files changed, 0 insertions, 17 deletions
diff --git a/librpc/ABI/ndr-1.0.0.sigs b/librpc/ABI/ndr-1.0.0.sigs index fccf47930c2..3177f3804d4 100644 --- a/librpc/ABI/ndr-1.0.0.sigs +++ b/librpc/ABI/ndr-1.0.0.sigs @@ -116,7 +116,6 @@ ndr_pull_enum_uint32: enum ndr_err_code (struct ndr_pull *, int, uint32_t *) ndr_pull_enum_uint8: enum ndr_err_code (struct ndr_pull *, int, uint8_t *) ndr_pull_generic_ptr: enum ndr_err_code (struct ndr_pull *, uint32_t *) ndr_pull_get_relative_base_offset: uint32_t (struct ndr_pull *) -ndr_pull_get_switch_value: uint32_t (struct ndr_pull *, const void *) ndr_pull_gid_t: enum ndr_err_code (struct ndr_pull *, int, gid_t *) ndr_pull_hyper: enum ndr_err_code (struct ndr_pull *, int, uint64_t *) ndr_pull_init_blob: struct ndr_pull *(const DATA_BLOB *, TALLOC_CTX *) @@ -190,7 +189,6 @@ ndr_push_enum_uint8: enum ndr_err_code (struct ndr_push *, int, uint8_t) ndr_push_expand: enum ndr_err_code (struct ndr_push *, uint32_t) ndr_push_full_ptr: enum ndr_err_code (struct ndr_push *, const void *) ndr_push_get_relative_base_offset: uint32_t (struct ndr_push *) -ndr_push_get_switch_value: uint32_t (struct ndr_push *, const void *) ndr_push_gid_t: enum ndr_err_code (struct ndr_push *, int, gid_t) ndr_push_hyper: enum ndr_err_code (struct ndr_push *, int, uint64_t) ndr_push_init_ctx: struct ndr_push *(TALLOC_CTX *) diff --git a/librpc/ndr/libndr.h b/librpc/ndr/libndr.h index 0edf8955efb..2a4e3fb098a 100644 --- a/librpc/ndr/libndr.h +++ b/librpc/ndr/libndr.h @@ -616,9 +616,7 @@ enum ndr_err_code ndr_check_pipe_chunk_trailer(struct ndr_pull *ndr, int ndr_fla enum ndr_err_code ndr_push_set_switch_value(struct ndr_push *ndr, const void *p, uint32_t val); enum ndr_err_code ndr_pull_set_switch_value(struct ndr_pull *ndr, const void *p, uint32_t val); enum ndr_err_code ndr_print_set_switch_value(struct ndr_print *ndr, const void *p, uint32_t val); -uint32_t ndr_push_get_switch_value(struct ndr_push *ndr, const void *p); uint32_t ndr_push_steal_switch_value(struct ndr_push *ndr, const void *p); -uint32_t ndr_pull_get_switch_value(struct ndr_pull *ndr, const void *p); uint32_t ndr_print_steal_switch_value(struct ndr_print *ndr, const void *p); uint32_t ndr_pull_steal_switch_value(struct ndr_pull *ndr, const void *p); enum ndr_err_code ndr_pull_struct_blob(const DATA_BLOB *blob, TALLOC_CTX *mem_ctx, void *p, ndr_pull_flags_fn_t fn); diff --git a/librpc/ndr/ndr.c b/librpc/ndr/ndr.c index 4c628c1dae4..5616eec211f 100644 --- a/librpc/ndr/ndr.c +++ b/librpc/ndr/ndr.c @@ -1230,14 +1230,6 @@ _PUBLIC_ enum ndr_err_code ndr_print_set_switch_value(struct ndr_print *ndr, con return ndr_token_store(ndr, &ndr->switch_list, p, val); } -/* - retrieve a switch value - */ -_PUBLIC_ uint32_t ndr_push_get_switch_value(struct ndr_push *ndr, const void *p) -{ - return ndr_token_peek(&ndr->switch_list, p); -} - /* retrieve a switch value (for push) and remove it from the list */ _PUBLIC_ uint32_t ndr_push_steal_switch_value(struct ndr_push *ndr, const void *p) { @@ -1252,11 +1244,6 @@ _PUBLIC_ uint32_t ndr_push_steal_switch_value(struct ndr_push *ndr, const void * return v; } -_PUBLIC_ uint32_t ndr_pull_get_switch_value(struct ndr_pull *ndr, const void *p) -{ - return ndr_token_peek(&ndr->switch_list, p); -} - /* retrieve a switch value and remove it from the list */ _PUBLIC_ uint32_t ndr_print_steal_switch_value(struct ndr_print *ndr, const void *p) { |