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 <pisit@ndrsolution.com>
This commit is contained in:
Pisit Sawangvonganan 2024-08-21 03:03:31 +07:00 committed by Anas Nashif
parent 847a4eaad2
commit 1e58b53d2a
1 changed files with 2 additions and 1 deletions

View File

@ -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);