summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMeco Man <[email protected]>2021-11-27 19:40:52 -0500
committerMeco Man <[email protected]>2021-11-27 23:52:34 -0500
commit2d505d8ffd482dfe7b5416a593ceff6ab341f989 (patch)
tree32280df4aa55b395252b1b7460f8a0bac9184bcf /src
parente13230ba7297eda36891bf8cc2f8436a09db46d8 (diff)
[kservice] 精简RT_PRINTF_PRECISION
Diffstat (limited to 'src')
-rw-r--r--src/Kconfig2
-rw-r--r--src/kservice.c15
2 files changed, 3 insertions, 14 deletions
diff --git a/src/Kconfig b/src/Kconfig
index 1a52f33b53..8647d35698 100644
--- a/src/Kconfig
+++ b/src/Kconfig
@@ -147,7 +147,7 @@ menu "kservice optimization"
default n
config RT_PRINTF_LONGLONG
- bool "Enable rt_xprintf functions to support long long format"
+ bool "Enable rt_printf-family functions to support long long format"
default n
endmenu
diff --git a/src/kservice.c b/src/kservice.c
index 5e877e5d2a..8b959cbd68 100644
--- a/src/kservice.c
+++ b/src/kservice.c
@@ -652,7 +652,6 @@ rt_inline int skip_atoi(const char **s)
#define SPECIAL (1 << 5) /* 0x */
#define LARGE (1 << 6) /* use 'ABCDEF' instead of 'abcdef' */
-#ifdef RT_PRINTF_PRECISION
static char *print_number(char *buf,
char *end,
#ifdef RT_PRINTF_LONGLONG
@@ -662,20 +661,10 @@ static char *print_number(char *buf,
#endif /* RT_PRINTF_LONGLONG */
int base,
int s,
+#ifdef RT_PRINTF_PRECISION
int precision,
- int type)
-#else
-static char *print_number(char *buf,
- char *end,
-#ifdef RT_PRINTF_LONGLONG
- long long num,
-#else
- long num,
-#endif /* RT_PRINTF_LONGLONG */
- int base,
- int s,
- int type)
#endif /* RT_PRINTF_PRECISION */
+ int type)
{
char c, sign;
#ifdef RT_PRINTF_LONGLONG