Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2e0fb404 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Linus Torvalds
Browse files

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: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 095d141b
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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
+0 −1
Original line number Diff line number Diff line
@@ -281,7 +281,6 @@ static inline int parse_lineno(const char *str, unsigned int *val)
 * allow the user to express a query which matches a format
 * containing embedded spaces.
 */
#define isodigit(c)		((c) >= '0' && (c) <= '7')
static char *unescape(char *str)
{
	char *in = str;
+0 −1
Original line number Diff line number Diff line
@@ -1208,7 +1208,6 @@ EXPORT_SYMBOL_GPL(sunrpc_cache_pipe_upcall);
 * key and content are both parsed by cache
 */

#define isodigit(c) (isdigit(c) && c <= '7')
int qword_get(char **bpp, char *dest, int bufsize)
{
	/* return bytes copied, or -1 on error */