summaryrefslogtreecommitdiff
path: root/kernel/libc/string/memcmp.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/memcmp.c
parenta85eacdd2406fede4d6ff5cb130b1758978cabb3 (diff)
New clang-format options
Diffstat (limited to 'kernel/libc/string/memcmp.c')
-rw-r--r--kernel/libc/string/memcmp.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/kernel/libc/string/memcmp.c b/kernel/libc/string/memcmp.c
index deeb029..5631d05 100644
--- a/kernel/libc/string/memcmp.c
+++ b/kernel/libc/string/memcmp.c
@@ -3,9 +3,11 @@
int memcmp(const void *s1, const void *s2, u32 n) {
int return_value = 0;
- for (u32 i = 0; i < n; i++)
- if (((unsigned char *)(s1))[i] != ((unsigned char *)(s2))[i])
+ for (u32 i = 0; i < n; i++) {
+ if (((unsigned char *)(s1))[i] != ((unsigned char *)(s2))[i]) {
return_value++;
+ }
+ }
return return_value;
}