style: format kprintf_internal for improved readability
Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
parent
40333f1a37
commit
57a21bd4e2
2 changed files with 15 additions and 10 deletions
|
|
@ -137,7 +137,8 @@ void kprintf_internal(const char *format, va_list args)
|
|||
if (*p == '%')
|
||||
{
|
||||
p++;
|
||||
if(*p == '\0') break;
|
||||
if (*p == '\0')
|
||||
break;
|
||||
switch (*p)
|
||||
{
|
||||
case 'c':
|
||||
|
|
@ -149,7 +150,8 @@ void kprintf_internal(const char *format, va_list args)
|
|||
case 's':
|
||||
{
|
||||
char *s = va_arg(args, char *);
|
||||
if (!s) s = "(null)";
|
||||
if (!s)
|
||||
s = "(null)";
|
||||
kprint(s);
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,5 +2,8 @@
|
|||
#define STRING_H
|
||||
|
||||
void *memset(void *s, int c, size_t n);
|
||||
void *memcpy(void *dest, const void *src, size_t n);
|
||||
int strcmp(const char *str1, const char *str2);
|
||||
size_t strlen(const char *s);
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue