Skip to content

Commit

Permalink
[klibc] format code
Browse files Browse the repository at this point in the history
  • Loading branch information
mysterywolf committed Dec 21, 2024
1 parent 1609336 commit 7772d46
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions components/libc/compilers/common/cstring.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
}
Expand Down Expand Up @@ -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)
Expand All @@ -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++;
Expand Down
2 changes: 1 addition & 1 deletion components/utilities/utest/utest_log.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7772d46

Please sign in to comment.