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/alloc.c b/src/alloc.c
index b9dc585..cd6844a 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -69,10 +69,11 @@
end = begin + size;
/* Check for overflows, and that there is enough free mem. */
- if (end > begin && begin >= alloc_base && end <= alloc_limit)
+ if (end > begin && begin >= alloc_base && end <= alloc_limit) {
alloc_base = end;
- else
+ } else {
begin = 0;
+ }
return (void *)begin;
}