diff options
author | 2013-11-29 19:00:50 +0000 | |
---|---|---|
committer | 2013-11-29 19:00:50 +0000 | |
commit | 80c62621bb25d2491e07ab57f489fdca1ee0d448 (patch) | |
tree | 01dd28d9a1e9f248b9742f6e236b4d071b5e9e49 /lib/libcompat/regexp/regexp.c | |
parent | Don't try to reuse _initial_thread in the fork() wrapper, as the (diff) | |
download | wireguard-openbsd-80c62621bb25d2491e07ab57f489fdca1ee0d448.tar.xz wireguard-openbsd-80c62621bb25d2491e07ab57f489fdca1ee0d448.zip |
fairly simple unsigned char casts for ctype
ok krw
Diffstat (limited to 'lib/libcompat/regexp/regexp.c')
-rw-r--r-- | lib/libcompat/regexp/regexp.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/libcompat/regexp/regexp.c b/lib/libcompat/regexp/regexp.c index 23f5b29ef45..a217ea7d491 100644 --- a/lib/libcompat/regexp/regexp.c +++ b/lib/libcompat/regexp/regexp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: regexp.c,v 1.6 2009/10/27 23:59:28 deraadt Exp $ */ +/* $OpenBSD: regexp.c,v 1.7 2013/11/29 19:00:50 deraadt Exp $ */ /* * regcomp and regexec -- regsub and regerror are elsewhere @@ -911,16 +911,17 @@ char *prog; break; case WORDA: /* Must be looking at a letter, digit, or _ */ - if ((!isalnum(*reginput)) && *reginput != '_') + if ((!isalnum((unsigned char)*reginput)) && *reginput != '_') return(0); /* Prev must be BOL or nonword */ if (reginput > regbol && - (isalnum(reginput[-1]) || reginput[-1] == '_')) + (isalnum((unsigned char)reginput[-1]) || + reginput[-1] == '_')) return(0); break; case WORDZ: /* Must be looking at non letter, digit, or _ */ - if (isalnum(*reginput) || *reginput == '_') + if (isalnum((unsigned char)*reginput) || *reginput == '_') return(0); /* We don't care what the previous char was */ break; |