From 50ab249849b8be0d735ae850ad6318df4dd6764c Mon Sep 17 00:00:00 2001 From: Richard Barry Date: Mon, 23 Nov 2009 11:18:07 +0000 Subject: [PATCH] Added yet another type cast to the else if clause in xTaskCheckForTimeOut. This is to ensure it works correctly on ALL 16 bit compilers (hopefully). --- Source/tasks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/tasks.c b/Source/tasks.c index 3cd2e9c02..6a78a5c0e 100644 --- a/Source/tasks.c +++ b/Source/tasks.c @@ -1744,7 +1744,7 @@ portBASE_TYPE xReturn; passed since vTaskSetTimeout() was called. */ xReturn = pdTRUE; } - else if( ( ( portTickType ) xTickCount - ( portTickType ) pxTimeOut->xTimeOnEntering ) < ( portTickType ) *pxTicksToWait ) + else if( ( ( portTickType ) ( ( portTickType ) xTickCount - ( portTickType ) pxTimeOut->xTimeOnEntering ) ) < ( portTickType ) *pxTicksToWait ) { /* Not a genuine timeout. Adjust parameters for time remaining. */ *pxTicksToWait -= ( ( portTickType ) xTickCount - ( portTickType ) pxTimeOut->xTimeOnEntering );