From 2f919ec4765e4484d79b866332fa19ec338db5c0 Mon Sep 17 00:00:00 2001 From: Lee Leahy Date: Wed, 8 Mar 2017 17:37:06 -0800 Subject: src/lib: Remove braces for single statements Fix the following warning detected by checkpatch.pl: WARNING: braces {} are not necessary for single statement blocks TEST=Build and run on Galileo Gen2 Change-Id: Ie4b41f6fb75142ddd75103a55e0347ed85e7e873 Signed-off-by: Lee Leahy Reviewed-on: https://review.coreboot.org/18697 Reviewed-by: Arthur Heymans Tested-by: build bot (Jenkins) --- src/lib/thread.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/lib/thread.c') diff --git a/src/lib/thread.c b/src/lib/thread.c index c2504823b9..9387b037dd 100644 --- a/src/lib/thread.c +++ b/src/lib/thread.c @@ -121,9 +121,8 @@ static void idle_thread(void *unused) { /* This thread never voluntarily yields. */ thread_prevent_coop(); - while (1) { + while (1) timers_run(); - } } static void schedule(struct thread *t) @@ -214,9 +213,8 @@ static void idle_thread_init(void) t = get_free_thread(); - if (t == NULL) { + if (t == NULL) die("No threads available for idle thread!\n"); - } /* Queue idle thread to run once all other threads have yielded. */ prepare_thread(t, idle_thread, NULL, call_wrapper, NULL); -- cgit v1.2.3