[winpr,stream] unify Stream_Fill and Stream_Zero
This commit is contained in:
parent
941c36f4f6
commit
04a5bbed4a
@ -1020,14 +1020,6 @@ extern "C"
|
||||
Stream_Rewind(_s, sizeof(UINT64));
|
||||
}
|
||||
|
||||
static INLINE void Stream_Zero(wStream* _s, size_t _n)
|
||||
{
|
||||
WINPR_ASSERT(_s);
|
||||
WINPR_ASSERT(Stream_GetRemainingCapacity(_s) >= (_n));
|
||||
memset(_s->pointer, '\0', (_n));
|
||||
Stream_Seek(_s, _n);
|
||||
}
|
||||
|
||||
static INLINE void Stream_Fill(wStream* _s, int _v, size_t _n)
|
||||
{
|
||||
WINPR_ASSERT(_s);
|
||||
@ -1036,6 +1028,11 @@ extern "C"
|
||||
Stream_Seek(_s, _n);
|
||||
}
|
||||
|
||||
static INLINE void Stream_Zero(wStream* _s, size_t _n)
|
||||
{
|
||||
Stream_Fill(_s, '\0', _n);
|
||||
}
|
||||
|
||||
static INLINE void Stream_Copy(wStream* _src, wStream* _dst, size_t _n)
|
||||
{
|
||||
WINPR_ASSERT(_src);
|
||||
|
Loading…
x
Reference in New Issue
Block a user