summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMeco Man <[email protected]>2024-12-20 19:42:18 -0500
committerMeco Man <[email protected]>2024-12-21 14:57:17 -0500
commit7772d4619adb94f760ee86734394ed5a8a61a2c9 (patch)
tree8681f5d19b34f7992c526eef475057e96e0488a6
parent16093369b28374cfd81bd2128c9d70aba637bc12 (diff)
[klibc] format code
-rw-r--r--components/libc/compilers/common/cstring.c10
-rw-r--r--components/utilities/utest/utest_log.h2
2 files changed, 6 insertions, 6 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++;
diff --git a/components/utilities/utest/utest_log.h b/components/utilities/utest/utest_log.h
index 6aa54386a8..c25815dc63 100644
--- a/components/utilities/utest/utest_log.h
+++ b/components/utilities/utest/utest_log.h
@@ -18,7 +18,7 @@
#undef DBG_TAG
#undef DBG_LVL
-#define DBG_TAG "testcase"
+#define DBG_TAG "utest"
#ifdef UTEST_DEBUG
#define DBG_LVL DBG_LOG
#else