Fix signed vs unsigned char issues found by NetBSD.
This commit is contained in:
parent
18a2a2b0a7
commit
46b7057d91
@ -234,7 +234,7 @@ rcv_sh_substitute(rcv_t *rcv, const char *str, size_t len)
|
||||
cmd = NULL;
|
||||
continue;
|
||||
} else if (*p == '{') {
|
||||
for (ref = ++p; *p && p < str+len && (isalnum(*p) || *p == '_'); p++)
|
||||
for (ref = ++p; *p && p < str+len && (isalnum((unsigned char)*p) || *p == '_'); p++)
|
||||
;
|
||||
reflen = p-ref;
|
||||
switch (*p) {
|
||||
@ -253,7 +253,7 @@ rcv_sh_substitute(rcv_t *rcv, const char *str, size_t len)
|
||||
goto err1;
|
||||
}
|
||||
} else {
|
||||
for (ref = p; *p && p < str+len && (isalnum(*p) || *p == '_'); p++)
|
||||
for (ref = p; *p && p < str+len && (isalnum((unsigned char)*p) || *p == '_'); p++)
|
||||
;
|
||||
reflen = p-ref;
|
||||
p--;
|
||||
@ -349,7 +349,7 @@ rcv_get_pkgver(rcv_t *rcv)
|
||||
vlen--;
|
||||
}
|
||||
vlen--;
|
||||
while (isspace(v[vlen-1])) {
|
||||
while (isspace((unsigned char)v[vlen-1])) {
|
||||
vlen--;
|
||||
}
|
||||
}
|
||||
|
@ -927,7 +927,7 @@ fetch_ssl_tolower(char in)
|
||||
* conversions.
|
||||
*/
|
||||
static int
|
||||
fetch_ssl_isalpha(char in)
|
||||
fetch_ssl_isalpha(unsigned char in)
|
||||
{
|
||||
return ((in >= 'A' && in <= 'Z') || (in >= 'a' && in <= 'z'));
|
||||
}
|
||||
@ -964,8 +964,8 @@ fetch_ssl_is_trad_domain_label(const char *l, size_t len, int wcok)
|
||||
if (!len || l[0] == '-' || l[len-1] == '-')
|
||||
return (0);
|
||||
for (i = 0; i < len; ++i) {
|
||||
if (!isdigit(l[i]) &&
|
||||
!fetch_ssl_isalpha(l[i]) &&
|
||||
if (!isdigit((unsigned char)l[i]) &&
|
||||
!fetch_ssl_isalpha((unsigned char)l[i]) &&
|
||||
!(l[i] == '*' && wcok) &&
|
||||
!(l[i] == '-' && l[i - 1] != '-'))
|
||||
return (0);
|
||||
|
@ -55,7 +55,7 @@ static bool is_revision(const char *str) {
|
||||
return false;
|
||||
}
|
||||
/* allow underscore for accepting perl-Digest-1.17_01_1 etc. */
|
||||
while (isdigit(str[0]) || str[0] == '_') {
|
||||
while (isdigit((unsigned char)str[0]) || str[0] == '_') {
|
||||
++str;
|
||||
}
|
||||
return str[0] == '\0';
|
||||
|
Loading…
Reference in New Issue
Block a user