From 9a1f977e39d8e9fcb6a9cb2a612f4743e802221d Mon Sep 17 00:00:00 2001 From: Anton Kling Date: Fri, 10 Nov 2023 15:47:08 +0100 Subject: Kernel Style: Change uint*_t -> u* --- kernel/libc/string/isequal.c | 2 +- kernel/libc/string/memcmp.c | 4 ++-- kernel/libc/string/memcpy.c | 8 ++++---- kernel/libc/string/memset.c | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) (limited to 'kernel/libc/string') diff --git a/kernel/libc/string/isequal.c b/kernel/libc/string/isequal.c index cdbd3cc..75f7366 100644 --- a/kernel/libc/string/isequal.c +++ b/kernel/libc/string/isequal.c @@ -7,7 +7,7 @@ int isequal(const char *s1, const char *s2) { return 1; } -int isequal_n(const char *s1, const char *s2, uint32_t n) { +int isequal_n(const char *s1, const char *s2, u32 n) { for(;*s1 && n;s1++,s2++,n--) if(*s1 != *s2) return 0; diff --git a/kernel/libc/string/memcmp.c b/kernel/libc/string/memcmp.c index 72c680a..db13ed2 100644 --- a/kernel/libc/string/memcmp.c +++ b/kernel/libc/string/memcmp.c @@ -1,10 +1,10 @@ #include "../include/string.h" -int memcmp(const void *s1, const void *s2, uint32_t n) +int memcmp(const void *s1, const void *s2, u32 n) { int return_value = 0; - for(uint32_t i = 0;i < n;i++) + for(u32 i = 0;i < n;i++) if(((unsigned char *)(s1))[i] != ((unsigned char *)(s2))[i]) return_value++; diff --git a/kernel/libc/string/memcpy.c b/kernel/libc/string/memcpy.c index 5c04407..1313261 100644 --- a/kernel/libc/string/memcpy.c +++ b/kernel/libc/string/memcpy.c @@ -1,18 +1,18 @@ #include "../include/string.h" void * -memcpy(void *dest, const void *src, uint32_t n) { +memcpy(void *dest, const void *src, u32 n) { unsigned char *d = dest; const unsigned char *s = src; for (; n >= 8; n -= 8, d += 8, s += 8) - *(uint64_t *)d = *(uint64_t *)s; + *(u64 *)d = *(u64 *)s; for (; n >= 4; n -= 4, d += 4, s += 4) - *(uint32_t *)d = *(uint32_t *)s; + *(u32 *)d = *(u32 *)s; for (; n >= 2; n -= 2, d += 2, s += 2) - *(uint16_t *)d = *(uint16_t *)s; + *(u16 *)d = *(u16 *)s; for (; n; n--) *d++ = *s++; diff --git a/kernel/libc/string/memset.c b/kernel/libc/string/memset.c index a446eb4..5d7de62 100644 --- a/kernel/libc/string/memset.c +++ b/kernel/libc/string/memset.c @@ -1,8 +1,8 @@ #include -void *memset(void *dst, const unsigned char c, uint32_t n) { +void *memset(void *dst, const unsigned char c, u32 n) { uintptr_t d = (uintptr_t)dst; - for (uint32_t i = 0; i < n; i++, d++) + for (u32 i = 0; i < n; i++, d++) *(unsigned char *)d = c; return (void *)d; -- cgit v1.2.3