Fix MISRA 2012 rule 10.4 violations (#852)

Fix MISRA 2012 rule 10.4 violations
This commit is contained in:
chinglee-iot
2023-11-28 19:21:03 +08:00
committed by GitHub
parent ce88adea2a
commit 1813a4551e
4 changed files with 27 additions and 27 deletions

View File

@ -603,7 +603,7 @@
configASSERT( xTimer );
taskENTER_CRITICAL();
{
if( ( pxTimer->ucStatus & tmrSTATUS_IS_AUTORELOAD ) == 0 )
if( ( pxTimer->ucStatus & tmrSTATUS_IS_AUTORELOAD ) == 0U )
{
/* Not an auto-reload timer. */
xReturn = pdFALSE;
@ -662,7 +662,7 @@
configASSERT( ppxTimerBuffer != NULL );
if( ( pxTimer->ucStatus & tmrSTATUS_IS_STATICALLY_ALLOCATED ) != 0 )
if( ( pxTimer->ucStatus & tmrSTATUS_IS_STATICALLY_ALLOCATED ) != 0U )
{
*ppxTimerBuffer = ( StaticTimer_t * ) pxTimer;
xReturn = pdTRUE;
@ -724,7 +724,7 @@
/* If the timer is an auto-reload timer then calculate the next
* expiry time and re-insert the timer in the list of active timers. */
if( ( pxTimer->ucStatus & tmrSTATUS_IS_AUTORELOAD ) != 0 )
if( ( pxTimer->ucStatus & tmrSTATUS_IS_AUTORELOAD ) != 0U )
{
prvReloadTimer( pxTimer, xNextExpireTime, xTimeNow );
}
@ -1001,7 +1001,7 @@
{
/* The timer expired before it was added to the active
* timer list. Process it now. */
if( ( pxTimer->ucStatus & tmrSTATUS_IS_AUTORELOAD ) != 0 )
if( ( pxTimer->ucStatus & tmrSTATUS_IS_AUTORELOAD ) != 0U )
{
prvReloadTimer( pxTimer, xMessage.u.xTimerParameters.xMessageValue + pxTimer->xTimerPeriodInTicks, xTimeNow );
}
@ -1165,7 +1165,7 @@
/* Is the timer in the list of active timers? */
taskENTER_CRITICAL();
{
if( ( pxTimer->ucStatus & tmrSTATUS_IS_ACTIVE ) == 0 )
if( ( pxTimer->ucStatus & tmrSTATUS_IS_ACTIVE ) == 0U )
{
xReturn = pdFALSE;
}