Skip to content

Commit 2d505d8

Browse files
committed
[kservice] 精简RT_PRINTF_PRECISION
1 parent e13230b commit 2d505d8

File tree

2 files changed

+3
-14
lines changed

2 files changed

+3
-14
lines changed

src/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ menu "kservice optimization"
147147
default n
148148

149149
config RT_PRINTF_LONGLONG
150-
bool "Enable rt_xprintf functions to support long long format"
150+
bool "Enable rt_printf-family functions to support long long format"
151151
default n
152152

153153
endmenu

src/kservice.c

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,6 @@ rt_inline int skip_atoi(const char **s)
652652
#define SPECIAL (1 << 5) /* 0x */
653653
#define LARGE (1 << 6) /* use 'ABCDEF' instead of 'abcdef' */
654654

655-
#ifdef RT_PRINTF_PRECISION
656655
static char *print_number(char *buf,
657656
char *end,
658657
#ifdef RT_PRINTF_LONGLONG
@@ -662,20 +661,10 @@ static char *print_number(char *buf,
662661
#endif /* RT_PRINTF_LONGLONG */
663662
int base,
664663
int s,
664+
#ifdef RT_PRINTF_PRECISION
665665
int precision,
666-
int type)
667-
#else
668-
static char *print_number(char *buf,
669-
char *end,
670-
#ifdef RT_PRINTF_LONGLONG
671-
long long num,
672-
#else
673-
long num,
674-
#endif /* RT_PRINTF_LONGLONG */
675-
int base,
676-
int s,
677-
int type)
678666
#endif /* RT_PRINTF_PRECISION */
667+
int type)
679668
{
680669
char c, sign;
681670
#ifdef RT_PRINTF_LONGLONG

0 commit comments

Comments
 (0)