mirror of
https://github.com/samba-team/samba.git
synced 2025-01-13 13:18:06 +03:00
r10720: Add helper function that does prs alignment on a specified number of bytes.
(This used to be commit 4576e6843b
)
This commit is contained in:
parent
ebf8a84375
commit
8c9ad87af2
@ -511,6 +511,24 @@ BOOL prs_align_uint64(prs_struct *ps)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/******************************************************************
|
||||
Align on a specific byte boundary
|
||||
*****************************************************************/
|
||||
|
||||
BOOL prs_align_custom(prs_struct *ps, uint8 boundary)
|
||||
{
|
||||
BOOL ret;
|
||||
uint8 old_align = ps->align;
|
||||
|
||||
ps->align = boundary;
|
||||
ret = prs_align(ps);
|
||||
ps->align = old_align;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
Align only if required (for the unistr2 string mainly)
|
||||
********************************************************************/
|
||||
|
Loading…
Reference in New Issue
Block a user