[PATCH 2/8] score: Fix allocation size calculation

Sebastian Huber sebastian.huber at embedded-brains.de
Fri Sep 25 04:28:19 UTC 2020


On 24/09/2020 18:30, Gedare Bloom wrote:

>> +#define MESSAGE_SIZE_LIMIT \
>> +  ( SIZE_MAX - sizeof( uintptr_t ) - 1 \
> Minor: should it be - ( sizeof( uintptr_t ) - 1 )?
> Or: - sizeof(uintptr_t) + 1
>
> The alignment up can add at most sizeof(uintptr_t)-1 bytes overhead I
> think is what this is trying to capture?
>
Oh, yes. Two minus are a plus.


More information about the devel mailing list