1
0
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:
Volker Lendecke 2009-01-17 17:52:22 +01:00
parent c655f19e1f
commit 8a1c6c2c99

View File

@ -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;