aboutsummaryrefslogtreecommitdiff
path: root/iri.c
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2022-11-29 23:03:55 +0000
committerOmar Polo <op@omarpolo.com>2022-11-29 23:03:55 +0000
commit06035a023710962df95f48d8486739154a9d707a (patch)
tree7c278bfc2c36c8aa9f9df6a81c82638aa0d1fefe /iri.c
parent97b306cbee6d105885a761e04274f661a0ec3757 (diff)
more is*() unsigned char cast
continuation of 6130e0eeac9db4fa8e6fe5934ec2d0ab202f979e
Diffstat (limited to 'iri.c')
-rw-r--r--iri.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/iri.c b/iri.c
index d62eef5..1436314 100644
--- a/iri.c
+++ b/iri.c
@@ -22,7 +22,7 @@
static inline int
unreserved(int p)
{
- return isalnum(p)
+ return isalnum((unsigned char)p)
|| p == '-'
|| p == '.'
|| p == '_'
@@ -109,7 +109,7 @@ parse_scheme(struct parser *p)
{
p->parsed->schema = p->iri;
- if (!isalpha(*p->iri)) {
+ if (!isalpha((unsigned char)*p->iri)) {
p->err = "illegal character in scheme";
return 0;
}
@@ -126,7 +126,7 @@ parse_scheme(struct parser *p)
*/
*p->iri = tolower(*p->iri);
p->iri++;
- } while (isalnum(*p->iri)
+ } while (isalnum((unsigned char)*p->iri)
|| *p->iri == '+'
|| *p->iri == '-'
|| *p->iri == '.');