From 107bea02fefdc4286e929d5cde48b2a57a0ded21 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Wed, 3 Nov 2021 22:40:26 +0000 Subject: task: Use bool for truthy return types Using bool makes it clear that the function returns "true" or "false", rather than any integer. It also avoids the need to use "!!" to set the value to 0 or 1, since the compiler ensures that "bool" is always a 0 or 1, even if another value is assigned. BRANCH=none BUG=b:172020503 TEST=make buildall Signed-off-by: Tom Hughes Change-Id: I164e5c03c23fa2f0ffb61e87f5613e080814ce10 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3262593 Reviewed-by: Keith Short --- zephyr/shim/src/tasks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'zephyr/shim/src') diff --git a/zephyr/shim/src/tasks.c b/zephyr/shim/src/tasks.c index 252fe5e66e..89e544c342 100644 --- a/zephyr/shim/src/tasks.c +++ b/zephyr/shim/src/tasks.c @@ -366,7 +366,7 @@ void task_enable_irq(int irq) arch_irq_enable(irq); } -inline int in_interrupt_context(void) +inline bool in_interrupt_context(void) { return k_is_in_isr(); } -- cgit v1.2.1