Skip to content

Commit 5d1d9df

Browse files
committed
Change the cast from UBaseType_t to size_t
This was causing problem for 8-bit ports. This was reported here - feilipu/Arduino_FreeRTOS_Library#136 Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
1 parent c0bfbb9 commit 5d1d9df

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

queue.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ BaseType_t xQueueGenericReset( QueueHandle_t xQueue,
513513
/* Check for multiplication overflow. */
514514
( ( SIZE_MAX / uxQueueLength ) >= uxItemSize ) &&
515515
/* Check for addition overflow. */
516-
( ( UBaseType_t ) ( SIZE_MAX - sizeof( Queue_t ) ) >= ( uxQueueLength * uxItemSize ) ) )
516+
( ( SIZE_MAX - sizeof( Queue_t ) ) >= ( size_t ) ( uxQueueLength * uxItemSize ) ) )
517517
{
518518
/* Allocate enough space to hold the maximum number of items that
519519
* can be in the queue at any time. It is valid for uxItemSize to be

0 commit comments

Comments
 (0)