Fix three network-related warnings.

This commit is contained in:
OBattler
2025-09-22 05:18:04 +02:00
parent 151c3d8730
commit b81dee7998
3 changed files with 4 additions and 1 deletions

View File

@@ -53,7 +53,8 @@ static bool checkreturn buf_write(pb_ostream_t *stream, const pb_byte_t *buf, si
{
pb_byte_t *dest = (pb_byte_t*)stream->state;
stream->state = dest + count;
if ((dest != NULL) && (buf != NULL))
memcpy(dest, buf, count * sizeof(pb_byte_t));
return true;