Skip to content

Commit

Permalink
cc_option simplify _allowed_in_name (twitter#205)
Browse files Browse the repository at this point in the history
- simplify check
- determine if character is alphanumeric by isalnum function
  • Loading branch information
michalbiesek authored and Yao Yue committed Jul 31, 2019
1 parent 24e3131 commit f71c657
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/cc_option.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f71c657

Please sign in to comment.