From 1e58b53d2a59bf226875de1cb0336480cc4b9304 Mon Sep 17 00:00:00 2001 From: Pisit Sawangvonganan Date: Wed, 21 Aug 2024 03:03:31 +0700 Subject: [PATCH] style: kernel: comply with MISRA C:2012 Rule 15.6 Add missing braces to comply with MISRA C:2012 Rule 15.6 and also following Zephyr's style guideline. Signed-off-by: Pisit Sawangvonganan --- kernel/thread_monitor.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/thread_monitor.c b/kernel/thread_monitor.c index 700ca790505..cba7d19e828 100644 --- a/kernel/thread_monitor.c +++ b/kernel/thread_monitor.c @@ -105,8 +105,9 @@ void k_thread_foreach_filter_by_cpu(unsigned int cpu, k_thread_user_cb_t user_cb SYS_PORT_TRACING_FUNC_ENTER(k_thread, foreach); for (thread = _kernel.threads; thread; thread = thread->next_thread) { - if (thread->base.cpu == cpu) + if (thread->base.cpu == cpu) { user_cb(thread, user_data); + } } SYS_PORT_TRACING_FUNC_EXIT(k_thread, foreach);