summaryrefslogtreecommitdiff
path: root/kernel/libc/string/isequal.c
diff options
context:
space:
mode:
authorAnton Kling <anton@kling.gg>2024-02-21 00:14:29 +0100
committerAnton Kling <anton@kling.gg>2024-02-21 00:14:29 +0100
commit8ff63b062d724826d8017504063df9b92f8e6703 (patch)
tree03bf0b5a278a4908da8912f956e5651bea9412f1 /kernel/libc/string/isequal.c
parenta85eacdd2406fede4d6ff5cb130b1758978cabb3 (diff)
New clang-format options
Diffstat (limited to 'kernel/libc/string/isequal.c')
-rw-r--r--kernel/libc/string/isequal.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/kernel/libc/string/isequal.c b/kernel/libc/string/isequal.c
index 90712db..c3dbebb 100644
--- a/kernel/libc/string/isequal.c
+++ b/kernel/libc/string/isequal.c
@@ -1,15 +1,19 @@
#include "../include/string.h"
int isequal(const char *s1, const char *s2) {
- for (; *s1; s1++, s2++)
- if (*s1 != *s2)
+ for (; *s1; s1++, s2++) {
+ if (*s1 != *s2) {
return 0;
+ }
+ }
return 1;
}
int isequal_n(const char *s1, const char *s2, u32 n) {
- for (; *s1 && n; s1++, s2++, n--)
- if (*s1 != *s2)
+ for (; *s1 && n; s1++, s2++, n--) {
+ if (*s1 != *s2) {
return 0;
+ }
+ }
return 1;
}