From 88fc433e5dfc3ddc3948d27b78be2e531113fa1e Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Sun, 3 Apr 2016 09:27:34 +0000 Subject: MISRA-related fixes. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@9229 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/rt/src/chthreads.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'os/rt/src') diff --git a/os/rt/src/chthreads.c b/os/rt/src/chthreads.c index 74c41fa7b..c9cbfac0d 100644 --- a/os/rt/src/chthreads.c +++ b/os/rt/src/chthreads.c @@ -172,8 +172,7 @@ thread_t *chThdCreateSuspendedI(const thread_descriptor_t *tdp) { chDbgCheck(MEM_IS_ALIGNED(tdp->wbase, PORT_WORKING_AREA_ALIGN) && MEM_IS_ALIGNED(tdp->wend, PORT_STACK_ALIGN) && (tdp->wend > tdp->wbase) && - ((size_t)((tdp->wend - tdp->wbase) * - sizeof (stkalign_t)) >= THD_WORKING_AREA_SIZE(0))); + (((size_t)tdp->wend - (size_t)tdp->wbase) >= THD_WORKING_AREA_SIZE(0))); chDbgCheck((tdp->prio <= HIGHPRIO) && (tdp->funcp != NULL)); /* The thread structure is laid out in the upper part of the thread @@ -518,7 +517,7 @@ void chThdExitS(msg_t msg) { registry because there is no memory to recover.*/ #if CH_CFG_USE_DYNAMIC == TRUE if ((tp->refs == (trefs_t)0) && - (tp->flags & CH_FLAG_MODE_MASK) == CH_FLAG_MODE_STATIC) { + ((tp->flags & CH_FLAG_MODE_MASK) == CH_FLAG_MODE_STATIC)) { REG_REMOVE(tp); } #else -- cgit v1.2.3