From f71c6579e5990024e707c183012f5fe0c4a66459 Mon Sep 17 00:00:00 2001 From: michalbiesek <39981869+michalbiesek@users.noreply.github.com> Date: Wed, 31 Jul 2019 19:44:31 +0200 Subject: [PATCH] cc_option simplify _allowed_in_name (#205) - simplify check - determine if character is alphanumeric by isalnum function --- src/cc_option.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/cc_option.c b/src/cc_option.c index 2a18fbf4c..330463760 100644 --- a/src/cc_option.c +++ b/src/cc_option.c @@ -441,8 +441,7 @@ static inline bool _allowed_in_name(char c) { /* the criteria is C's rules on variable names since we use it as such */ - if ((c >= 'a' && c <= 'z') || c == '_' || (c >= 'A' && c <= 'Z') || - (c >= '0' && c <= '9')) { + if (isalnum(c) || c == '_') { return true; } else { return false;