From: richardbarry Date: Mon, 23 Nov 2009 11:18:07 +0000 (+0000) Subject: Added yet another type cast to the else if clause in xTaskCheckForTimeOut. This... X-Git-Tag: V6.0.3~45 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=8a702d5c597bdfc8df5b2ec91278432b28597075;p=freertos 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). git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@941 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- 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 );