diff options
author | Volker Lendecke <vl@sernet.de> | 2008-09-03 14:22:48 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2008-09-03 14:47:48 +0200 |
commit | 84fca380f2040c53d20fff41972d2f4102183766 (patch) | |
tree | 512958098aaa2aa10ce486fafd7e5a41ffc6fb32 /source3/rpc_parse | |
parent | 29dd253e696f9a2f94fc13f408996eca9ede8a7d (diff) | |
download | samba-84fca380f2040c53d20fff41972d2f4102183766.tar.gz samba-84fca380f2040c53d20fff41972d2f4102183766.tar.bz2 samba-84fca380f2040c53d20fff41972d2f4102183766.zip |
factor prs_append_some_data out of prs_append_some_prs_data
(This used to be commit 32cb45c962c822bd79a7d0f666f2f6037060b324)
Diffstat (limited to 'source3/rpc_parse')
-rw-r--r-- | source3/rpc_parse/parse_prs.c | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/source3/rpc_parse/parse_prs.c b/source3/rpc_parse/parse_prs.c index 072132f5ac..b3deb80c5d 100644 --- a/source3/rpc_parse/parse_prs.c +++ b/source3/rpc_parse/parse_prs.c @@ -395,18 +395,26 @@ bool prs_append_prs_data(prs_struct *dst, prs_struct *src) Append some data from one parse_struct into another. ********************************************************************/ -bool prs_append_some_prs_data(prs_struct *dst, prs_struct *src, int32 start, uint32 len) -{ - if (len == 0) - return True; +bool prs_append_some_data(prs_struct *dst, void *src_base, uint32_t start, + uint32_t len) +{ + if (len == 0) { + return true; + } - if(!prs_grow(dst, len)) - return False; - - memcpy(&dst->data_p[dst->data_offset], src->data_p + start, (size_t)len); + if(!prs_grow(dst, len)) { + return false; + } + + memcpy(&dst->data_p[dst->data_offset], src_base + start, (size_t)len); dst->data_offset += len; + return true; +} - return True; +bool prs_append_some_prs_data(prs_struct *dst, prs_struct *src, int32 start, + uint32 len) +{ + return prs_append_some_data(dst, src->data_p, start, len); } /******************************************************************* |