diff options
author | Stefan Metzmacher <metze@samba.org> | 2007-11-20 11:07:57 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2007-12-21 05:45:47 +0100 |
commit | cc9c53320dd68a5603e3dbccce2b49268f1a9f30 (patch) | |
tree | f7450667869dcd07e37926d07f228e49c89d612f /source4/librpc/ndr | |
parent | 8267a7a64bb9ff7d5a6594491eda6cc22a86701f (diff) | |
download | samba-cc9c53320dd68a5603e3dbccce2b49268f1a9f30.tar.gz samba-cc9c53320dd68a5603e3dbccce2b49268f1a9f30.tar.bz2 samba-cc9c53320dd68a5603e3dbccce2b49268f1a9f30.zip |
r26050: ndr: don't use ndr_push_save anymore
metze
(This used to be commit a682fbb5af1ca02068fdef9ed9a4dd7b0201d88c)
Diffstat (limited to 'source4/librpc/ndr')
-rw-r--r-- | source4/librpc/ndr/ndr.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/source4/librpc/ndr/ndr.c b/source4/librpc/ndr/ndr.c index 6a1850624b..c51e77cde5 100644 --- a/source4/librpc/ndr/ndr.c +++ b/source4/librpc/ndr/ndr.c @@ -914,12 +914,12 @@ _PUBLIC_ enum ndr_err_code ndr_push_relative_ptr1(struct ndr_push *ndr, const vo */ _PUBLIC_ enum ndr_err_code ndr_push_relative_ptr2(struct ndr_push *ndr, const void *p) { - struct ndr_push_save save; + uint32_t save_offset; uint32_t ptr_offset = 0xFFFFFFFF; if (p == NULL) { return NDR_ERR_SUCCESS; } - ndr_push_save(ndr, &save); + save_offset = ndr->offset; NDR_CHECK(ndr_token_retrieve(&ndr->relative_list, p, &ptr_offset)); if (ptr_offset > ndr->offset) { return ndr_push_error(ndr, NDR_ERR_BUFSIZE, @@ -927,13 +927,13 @@ _PUBLIC_ enum ndr_err_code ndr_push_relative_ptr2(struct ndr_push *ndr, const vo ptr_offset, ndr->offset); } ndr->offset = ptr_offset; - if (save.offset < ndr->relative_base_offset) { + if (save_offset < ndr->relative_base_offset) { return ndr_push_error(ndr, NDR_ERR_BUFSIZE, - "ndr_push_relative_ptr2 save.offset(%u) < ndr->relative_base_offset(%u)", - save.offset, ndr->relative_base_offset); + "ndr_push_relative_ptr2 save_offset(%u) < ndr->relative_base_offset(%u)", + save_offset, ndr->relative_base_offset); } - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, save.offset - ndr->relative_base_offset)); - ndr_push_restore(ndr, &save); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, save_offset - ndr->relative_base_offset)); + ndr->offset = save_offset; return NDR_ERR_SUCCESS; } |