From b033314bf1901d436dc71d41d5e1f37dda47e511 Mon Sep 17 00:00:00 2001 From: Anton Kling Date: Thu, 12 Dec 2024 16:03:08 +0100 Subject: formatting: Use clang-format on all projects This commit also add braces to all `if` statements. --- userland/libc/string/strchr.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'userland/libc/string/strchr.c') diff --git a/userland/libc/string/strchr.c b/userland/libc/string/strchr.c index 1995547..179e47c 100644 --- a/userland/libc/string/strchr.c +++ b/userland/libc/string/strchr.c @@ -2,10 +2,12 @@ char *strchr(const char *s, int c) { for (; *s; s++) { - if (*s == (char)c) - return (char*)s; + if (*s == (char)c) { + return (char *)s; + } } - if ((char)c == '\0') + if ((char)c == '\0') { return (char *)s; + } return NULL; } -- cgit v1.2.3