Skip to content

Commit 984e8e5

Browse files
author
chenchaoqun
committed
[modify] internal function 'isdigit' name to '_ISDIGIT'
1 parent e6b7215 commit 984e8e5

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
@@ -543,7 +543,7 @@ void rt_show_version(void)
543543
RTM_EXPORT(rt_show_version);
544544

545545
/* private function */
546-
#define isdigit(c) ((unsigned)((c) - '0') < 10)
546+
#define _ISDIGIT(c) ((unsigned)((c) - '0') < 10)
547547

548548
#ifdef RT_PRINTF_LONGLONG
549549
rt_inline int divide(long long *n, int base)
@@ -588,7 +588,7 @@ rt_inline int divide(long *n, int base)
588588
rt_inline int skip_atoi(const char **s)
589589
{
590590
register int i = 0;
591-
while (isdigit(**s))
591+
while (_ISDIGIT(**s))
592592
i = i * 10 + *((*s)++) - '0';
593593

594594
return i;
@@ -834,7 +834,7 @@ rt_int32_t rt_vsnprintf(char *buf,
834834

835835
/* get field width */
836836
field_width = -1;
837-
if (isdigit(*fmt)) field_width = skip_atoi(&fmt);
837+
if (_ISDIGIT(*fmt)) field_width = skip_atoi(&fmt);
838838
else if (*fmt == '*')
839839
{
840840
++ fmt;
@@ -853,7 +853,7 @@ rt_int32_t rt_vsnprintf(char *buf,
853853
if (*fmt == '.')
854854
{
855855
++ fmt;
856-
if (isdigit(*fmt)) precision = skip_atoi(&fmt);
856+
if (_ISDIGIT(*fmt)) precision = skip_atoi(&fmt);
857857
else if (*fmt == '*')
858858
{
859859
++ fmt;

0 commit comments

Comments
 (0)