summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2020-08-01 16:51:55 +0800
committerGitHub <[email protected]>2020-08-01 16:51:55 +0800
commitaa7247eccdfa04d5101ce9e77f821b884e33793c (patch)
tree464b88c3f3b5caf013c73d364c85d31453a07235 /src
parent27e1ac505d983ccbb72b4353c786ba65151066dd (diff)
parent984e8e5651d98be190c4607b087ca6907026e96a (diff)
Merge pull request #3764 from ErnestChen1/isdigit0724
[modify] internal function 'isdigit' name to '_isdigit'
Diffstat (limited to 'src')
-rw-r--r--src/kservice.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/kservice.c b/src/kservice.c
index dd7458f106..7caf43ce28 100644
--- a/src/kservice.c
+++ b/src/kservice.c
@@ -546,7 +546,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)
@@ -591,7 +591,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;
@@ -837,7 +837,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;
@@ -856,7 +856,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;