Skip to content

Commit

Permalink
Change the cast from UBaseType_t to size_t (FreeRTOS#1153)
Browse files Browse the repository at this point in the history
This was causing problem for 8-bit ports.

This was reported here - FreeRTOS#1151

Signed-off-by: Gaurav Aggarwal <[email protected]>
  • Loading branch information
aggarg authored Sep 30, 2024
1 parent c0bfbb9 commit de7c014
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion queue.c
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ BaseType_t xQueueGenericReset( QueueHandle_t xQueue,
/* Check for multiplication overflow. */
( ( SIZE_MAX / uxQueueLength ) >= uxItemSize ) &&
/* Check for addition overflow. */
( ( UBaseType_t ) ( SIZE_MAX - sizeof( Queue_t ) ) >= ( uxQueueLength * uxItemSize ) ) )
( ( SIZE_MAX - sizeof( Queue_t ) ) >= ( size_t ) ( uxQueueLength * uxItemSize ) ) )
{
/* Allocate enough space to hold the maximum number of items that
* can be in the queue at any time. It is valid for uxItemSize to be
Expand Down

0 comments on commit de7c014

Please sign in to comment.