[winpr,stream] unify Stream_Fill and Stream_Zero

This commit is contained in:
akallabeth 2024-10-22 12:03:34 +02:00
parent 941c36f4f6
commit 04a5bbed4a
No known key found for this signature in database
GPG Key ID: A49454A3FC909FD5

View File

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