diff options
Diffstat (limited to 'sample/atou.c')
-rw-r--r-- | sample/atou.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/sample/atou.c b/sample/atou.c index 84475b68..73b0bb79 100644 --- a/sample/atou.c +++ b/sample/atou.c @@ -1,13 +1,12 @@ -static inline int -isdigit(int ch) +static inline int isdigit(int ch) { - return (ch >= '0') && (ch <= '9'); + return (ch >= '0') && (ch <= '9'); } unsigned int atou(const char *s) { - unsigned int i = 0; - while (isdigit(*s)) - i = i*10 + (*s++ - '0'); - return i; + unsigned int i = 0; + while (isdigit(*s)) + i = i * 10 + (*s++ - '0'); + return i; } |