diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2013-04-29 16:18:11 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-04-29 18:28:19 -0700 |
commit | 2e0fb404c86d6c86dc33e284310eb5d28d192dcf (patch) | |
tree | c75a1dd1cab54473d3174aa00fc49d18deabfa5e /include | |
parent | 095d141b2e40665289d44a42d387ffac2841ef82 (diff) |
lib, net: make isodigit() public and use it
There are at least two users of isodigit(). Let's make it a public
function of ctype.h.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/ctype.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/ctype.h b/include/linux/ctype.h index 8acfe312f947..653589e3e30e 100644 --- a/include/linux/ctype.h +++ b/include/linux/ctype.h @@ -61,4 +61,10 @@ static inline char _tolower(const char c) return c | 0x20; } +/* Fast check for octal digit */ +static inline int isodigit(const char c) +{ + return c >= '0' && c <= '7'; +} + #endif |