summaryrefslogtreecommitdiff
path: root/src/kservice.c
diff options
context:
space:
mode:
authorchenchaoqun <[email protected]>2020-07-24 11:53:57 +0800
committerchenchaoqun <[email protected]>2020-07-27 15:46:21 +0800
commit984e8e5651d98be190c4607b087ca6907026e96a (patch)
tree78ef222ee7b45c7dad05c1a8180c3930e88947bc /src/kservice.c
parente6b72153b440ae6eb9cf98bdc44c29903042373f (diff)
[modify] internal function 'isdigit' name to '_ISDIGIT'
Diffstat (limited to 'src/kservice.c')
-rw-r--r--src/kservice.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/kservice.c b/src/kservice.c
index 1705ce5283..cf03fb59b1 100644
--- a/src/kservice.c
+++ b/src/kservice.c
@@ -543,7 +543,7 @@ void rt_show_version(void)
RTM_EXPORT(rt_show_version);
/* private function */
-#define isdigit(c) ((unsigned)((c) - '0') < 10)
+#define _ISDIGIT(c) ((unsigned)((c) - '0') < 10)
#ifdef RT_PRINTF_LONGLONG
rt_inline int divide(long long *n, int base)
@@ -588,7 +588,7 @@ rt_inline int divide(long *n, int base)
rt_inline int skip_atoi(const char **s)
{
register int i = 0;
- while (isdigit(**s))
+ while (_ISDIGIT(**s))
i = i * 10 + *((*s)++) - '0';
return i;
@@ -834,7 +834,7 @@ rt_int32_t rt_vsnprintf(char *buf,
/* get field width */
field_width = -1;
- if (isdigit(*fmt)) field_width = skip_atoi(&fmt);
+ if (_ISDIGIT(*fmt)) field_width = skip_atoi(&fmt);
else if (*fmt == '*')
{
++ fmt;
@@ -853,7 +853,7 @@ rt_int32_t rt_vsnprintf(char *buf,
if (*fmt == '.')
{
++ fmt;
- if (isdigit(*fmt)) precision = skip_atoi(&fmt);
+ if (_ISDIGIT(*fmt)) precision = skip_atoi(&fmt);
else if (*fmt == '*')
{
++ fmt;