summaryrefslogtreecommitdiff
path: root/zephyr/shim/src
diff options
context:
space:
mode:
authorTom Hughes <tomhughes@chromium.org>2021-11-03 22:40:26 +0000
committerCommit Bot <commit-bot@chromium.org>2021-11-09 20:01:00 +0000
commit107bea02fefdc4286e929d5cde48b2a57a0ded21 (patch)
tree2425f5da2266263843be341dda7ef1d3bf80699d /zephyr/shim/src
parentbb8a41cb2ba8b5c66a4035772173eb0057a9096c (diff)
downloadchrome-ec-107bea02fefdc4286e929d5cde48b2a57a0ded21.tar.gz
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 <tomhughes@chromium.org> Change-Id: I164e5c03c23fa2f0ffb61e87f5613e080814ce10 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3262593 Reviewed-by: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'zephyr/shim/src')
-rw-r--r--zephyr/shim/src/tasks.c2
1 files changed, 1 insertions, 1 deletions
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();
}