From: Volker Lendecke Date: Sat, 17 Jan 2009 16:52:22 +0000 (+0100) Subject: Tiny simplification of prs_set_offset X-Git-Tag: samba-4.0.0alpha6~39^2~4^2~6 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8a1c6c2c994b2eac05e8cbc3c692d7367b687d32;p=thirdparty%2Fsamba.git Tiny simplification of prs_set_offset --- diff --git a/source3/rpc_parse/parse_prs.c b/source3/rpc_parse/parse_prs.c index d549265fa11..1332a8311a1 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;