mirror of
https://github.com/samba-team/samba.git
synced 2024-12-25 23:21:54 +03:00
Tiny simplification of prs_set_offset
This commit is contained in:
parent
c655f19e1f
commit
8a1c6c2c99
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user