Merge pull request #14034 from s-hadinger/berry_fix_byteslib_warning

Fix warning
This commit is contained in:
s-hadinger 2021-12-13 19:34:12 +01:00 committed by GitHub
commit 25f7518f73
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -246,7 +246,7 @@ static unsigned int decode_base64(unsigned char input[], unsigned char output[])
static void buf_set_len(buf_impl* attr, const size_t len)
{
uint16_t old_len = attr->len;
attr->len = ((int32_t)len <= attr->size) ? len : attr->size;
attr->len = ((int32_t)len <= attr->size) ? (int32_t)len : attr->size;
if (old_len < attr->len) {
memset((void*) &attr->bufptr[old_len], 0, attr->len - old_len);
}