diff options
| author | Meco Man <[email protected]> | 2024-12-20 19:42:18 -0500 |
|---|---|---|
| committer | Meco Man <[email protected]> | 2024-12-21 14:57:17 -0500 |
| commit | 7772d4619adb94f760ee86734394ed5a8a61a2c9 (patch) | |
| tree | 8681f5d19b34f7992c526eef475057e96e0488a6 /components/libc/compilers/common | |
| parent | 16093369b28374cfd81bd2128c9d70aba637bc12 (diff) | |
[klibc] format code
Diffstat (limited to 'components/libc/compilers/common')
| -rw-r--r-- | components/libc/compilers/common/cstring.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/components/libc/compilers/common/cstring.c b/components/libc/compilers/common/cstring.c index 59c516d273..41f6c658ce 100644 --- a/components/libc/compilers/common/cstring.c +++ b/components/libc/compilers/common/cstring.c @@ -13,13 +13,13 @@ #include <rtthread.h> #include <stdlib.h> +#ifndef RT_USING_PICOLIBC /** * @brief erases the data in the n bytes of the memory starting at the * location pointed to by s, by writing zeros (bytes containing '\0') to that area. * * @note The bzero() function is deprecated (marked as LEGACY in POSIX. 1-2001). */ -#ifndef RT_USING_PICOLIBC void bzero(void* s, size_t n) { rt_memset(s, 0, n); @@ -46,12 +46,12 @@ void explicit_bzero(void* s, size_t n) } } -char* index(const char* s, int c) +char *index(const char* s, int c) { return strchr(s, c); } -char* rindex(const char* s, int c) +char *rindex(const char* s, int c) { return strrchr(s, c); } @@ -99,7 +99,7 @@ int ffsll(long long i) * * @note This function is GNU extension, available since glibc 2.1.91. */ -void* memrchr(const void* ptr, int ch, size_t pos) +void *memrchr(const void* ptr, int ch, size_t pos) { char* end = (char*)ptr + pos - 1; while (end != ptr) @@ -118,7 +118,7 @@ size_t strnlen(const char *s, size_t maxlen) return sc - s; } -char* strchrnul(const char* s, int c) +char *strchrnul(const char* s, int c) { while (*s != '\0' && *s != c) s++; |
