style: add braces around if/while statements
Per guidelines, all statements should have braces around them. We do not
have a CI check for this, so a few went in unnoticed.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
diff --git a/lib/libc/minimal/source/string/string.c b/lib/libc/minimal/source/string/string.c
index a974227..8fcd271 100644
--- a/lib/libc/minimal/source/string/string.c
+++ b/lib/libc/minimal/source/string/string.c
@@ -68,8 +68,9 @@
{
char tmp = (char) c;
- while ((*s != tmp) && (*s != '\0'))
+ while ((*s != tmp) && (*s != '\0')) {
s++;
+ }
return (*s == tmp) ? (char *) s : NULL;
}
@@ -180,8 +181,9 @@
const char *c1 = m1;
const char *c2 = m2;
- if (!n)
+ if (!n) {
return 0;
+ }
while ((--n > 0) && (*c1 == *c2)) {
c1++;