Skip to content

Commit aa7247e

Browse files
authored
Merge pull request #3764 from ErnestChen1/isdigit0724
[modify] internal function 'isdigit' name to '_isdigit'
2 parents 27e1ac5 + 984e8e5 commit aa7247e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/kservice.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,7 @@ void rt_show_version(void)
546546
RTM_EXPORT(rt_show_version);
547547

548548
/* private function */
549-
#define isdigit(c) ((unsigned)((c) - '0') < 10)
549+
#define _ISDIGIT(c) ((unsigned)((c) - '0') < 10)
550550

551551
#ifdef RT_PRINTF_LONGLONG
552552
rt_inline int divide(long long *n, int base)
@@ -591,7 +591,7 @@ rt_inline int divide(long *n, int base)
591591
rt_inline int skip_atoi(const char **s)
592592
{
593593
register int i = 0;
594-
while (isdigit(**s))
594+
while (_ISDIGIT(**s))
595595
i = i * 10 + *((*s)++) - '0';
596596

597597
return i;
@@ -837,7 +837,7 @@ rt_int32_t rt_vsnprintf(char *buf,
837837

838838
/* get field width */
839839
field_width = -1;
840-
if (isdigit(*fmt)) field_width = skip_atoi(&fmt);
840+
if (_ISDIGIT(*fmt)) field_width = skip_atoi(&fmt);
841841
else if (*fmt == '*')
842842
{
843843
++ fmt;
@@ -856,7 +856,7 @@ rt_int32_t rt_vsnprintf(char *buf,
856856
if (*fmt == '.')
857857
{
858858
++ fmt;
859-
if (isdigit(*fmt)) precision = skip_atoi(&fmt);
859+
if (_ISDIGIT(*fmt)) precision = skip_atoi(&fmt);
860860
else if (*fmt == '*')
861861
{
862862
++ fmt;

0 commit comments

Comments
 (0)