diff options
author | Volker Lendecke <vl@samba.org> | 2009-01-17 17:52:22 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2009-01-18 15:40:44 +0100 |
commit | 8a1c6c2c994b2eac05e8cbc3c692d7367b687d32 (patch) | |
tree | 01f68e56f05d454e9bec517a740e420bf90ecc85 /source3/rpc_parse | |
parent | c655f19e1fa3a1443fd16927d37035a4f4cf46aa (diff) | |
download | samba-8a1c6c2c994b2eac05e8cbc3c692d7367b687d32.tar.gz samba-8a1c6c2c994b2eac05e8cbc3c692d7367b687d32.tar.bz2 samba-8a1c6c2c994b2eac05e8cbc3c692d7367b687d32.zip |
Tiny simplification of prs_set_offset
Diffstat (limited to 'source3/rpc_parse')
-rw-r--r-- | source3/rpc_parse/parse_prs.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/source3/rpc_parse/parse_prs.c b/source3/rpc_parse/parse_prs.c index d549265fa1..1332a8311a 100644 --- a/source3/rpc_parse/parse_prs.c +++ b/source3/rpc_parse/parse_prs.c @@ -361,13 +361,10 @@ uint32 prs_offset(prs_struct *ps) bool prs_set_offset(prs_struct *ps, uint32 offset) { - if(offset <= ps->data_offset) { - ps->data_offset = offset; - return True; - } - - if(!prs_grow(ps, offset - ps->data_offset)) + if ((offset > ps->data_offset) + && !prs_grow(ps, offset - ps->data_offset)) { return False; + } ps->data_offset = offset; return True; |