aboutsummaryrefslogtreecommitdiff
path: root/src/userspace/mlibc/string/memcmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/userspace/mlibc/string/memcmp.c')
-rw-r--r--src/userspace/mlibc/string/memcmp.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/userspace/mlibc/string/memcmp.c b/src/userspace/mlibc/string/memcmp.c
index af2125c..f1f1e3f 100644
--- a/src/userspace/mlibc/string/memcmp.c
+++ b/src/userspace/mlibc/string/memcmp.c
@@ -2,13 +2,13 @@
int memcmp(const void *a_ptr, const void *b_ptr, size_t size)
{
- const unsigned char *a = (const unsigned char *) a_ptr;
- const unsigned char *b = (const unsigned char *) b_ptr;
- for (size_t i = 0; i < size; i++) {
- if (a[i] < b[i])
- return -1;
- else if (b[i] < a[i])
- return 1;
- }
- return 0;
+ const unsigned char *a = (const unsigned char *)a_ptr;
+ const unsigned char *b = (const unsigned char *)b_ptr;
+ for (size_t i = 0; i < size; i++) {
+ if (a[i] < b[i])
+ return -1;
+ else if (b[i] < a[i])
+ return 1;
+ }
+ return 0;
} \ No newline at end of file