aboutsummaryrefslogtreecommitdiffstats
path: root/os/rt/src/chdynamic.c
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2015-03-05 21:28:51 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2015-03-05 21:28:51 +0000
commitb53489d0e4252aafe5ada7466e0b3b7c4ad5aaaf (patch)
tree2efd9ba0b52dfed9daefb6eb4d6b86b073776a21 /os/rt/src/chdynamic.c
parent880d6916b3fb25b3972ed78b380db630524623e7 (diff)
downloadChibiOS-b53489d0e4252aafe5ada7466e0b3b7c4ad5aaaf.tar.gz
ChibiOS-b53489d0e4252aafe5ada7466e0b3b7c4ad5aaaf.tar.bz2
ChibiOS-b53489d0e4252aafe5ada7466e0b3b7c4ad5aaaf.zip
Lots of MISRA-related changes in RT. Not finished yet.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7715 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/rt/src/chdynamic.c')
-rw-r--r--os/rt/src/chdynamic.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/os/rt/src/chdynamic.c b/os/rt/src/chdynamic.c
index 78a667966..9a0c33303 100644
--- a/os/rt/src/chdynamic.c
+++ b/os/rt/src/chdynamic.c
@@ -68,9 +68,10 @@
thread_t *chThdAddRef(thread_t *tp) {
chSysLock();
- chDbgAssert(tp->p_refs < 255, "too many references");
+ chDbgAssert(tp->p_refs < 255U, "too many references");
tp->p_refs++;
chSysUnlock();
+
return tp;
}
@@ -98,7 +99,7 @@ void chThdRelease(thread_t *tp) {
/* If the references counter reaches zero and the thread is in its
terminated state then the memory can be returned to the proper
allocator. Of course static threads are not affected.*/
- if ((refs == 0) && (tp->p_state == CH_STATE_FINAL)) {
+ if ((refs == 0U) && (tp->p_state == CH_STATE_FINAL)) {
switch (tp->p_flags & CH_FLAG_MODE_MASK) {
#if CH_CFG_USE_HEAP
case CH_FLAG_MODE_HEAP: