Hold on to your braces!
This introduces the use of clang-tidy for static analysis and linting.
We start by ensuring that we use braces everywhere to reduce the risk of
programmer error caused by the misuse of scope.
Change-Id: I8aba449e6ef8405192d04aff5ed827f97e458d3d
diff --git a/src/cpu.c b/src/cpu.c
index bb84bbb..cab40b8 100644
--- a/src/cpu.c
+++ b/src/cpu.c
@@ -44,14 +44,16 @@
void cpu_irq_enable(struct cpu *c)
{
c->irq_disable_count--;
- if (!c->irq_disable_count)
+ if (!c->irq_disable_count) {
arch_irq_enable();
+ }
}
void cpu_irq_disable(struct cpu *c)
{
- if (!c->irq_disable_count)
+ if (!c->irq_disable_count) {
arch_irq_disable();
+ }
c->irq_disable_count++;
}