aboutsummaryrefslogtreecommitdiffstats
path: root/os/rt/src/chregistry.c
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2015-03-03 11:01:09 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2015-03-03 11:01:09 +0000
commitfbd65c1f6ae3c802467ab99f4b2fe9c7c084972e (patch)
treecafc124edd19ce4f3b676a9de703f7a0aefed409 /os/rt/src/chregistry.c
parent3d1a86e9fb0b9495a726dab534e97c063b5f368b (diff)
downloadChibiOS-fbd65c1f6ae3c802467ab99f4b2fe9c7c084972e.tar.gz
ChibiOS-fbd65c1f6ae3c802467ab99f4b2fe9c7c084972e.tar.bz2
ChibiOS-fbd65c1f6ae3c802467ab99f4b2fe9c7c084972e.zip
MISRA-related fixes.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7711 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/rt/src/chregistry.c')
-rw-r--r--os/rt/src/chregistry.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/os/rt/src/chregistry.c b/os/rt/src/chregistry.c
index a9646f478..043fb1516 100644
--- a/os/rt/src/chregistry.c
+++ b/os/rt/src/chregistry.c
@@ -134,6 +134,7 @@ thread_t *chRegFirstThread(void) {
tp->p_refs++;
#endif
chSysUnlock();
+
return tp;
}
@@ -153,8 +154,9 @@ thread_t *chRegNextThread(thread_t *tp) {
chSysLock();
ntp = tp->p_newer;
- if (ntp == (thread_t *)&ch.rlist)
+ if (ntp == (thread_t *)&ch.rlist) {
ntp = NULL;
+ }
#if CH_CFG_USE_DYNAMIC
else {
chDbgAssert(ntp->p_refs < 255, "too many references");
@@ -165,6 +167,7 @@ thread_t *chRegNextThread(thread_t *tp) {
#if CH_CFG_USE_DYNAMIC
chThdRelease(tp);
#endif
+
return ntp;
}