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;
|
cmd = NULL;
|
||||||
continue;
|
continue;
|
||||||
} else if (*p == '{') {
|
} 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;
|
reflen = p-ref;
|
||||||
switch (*p) {
|
switch (*p) {
|
||||||
@ -253,7 +253,7 @@ rcv_sh_substitute(rcv_t *rcv, const char *str, size_t len)
|
|||||||
goto err1;
|
goto err1;
|
||||||
}
|
}
|
||||||
} else {
|
} 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;
|
reflen = p-ref;
|
||||||
p--;
|
p--;
|
||||||
@ -349,7 +349,7 @@ rcv_get_pkgver(rcv_t *rcv)
|
|||||||
vlen--;
|
vlen--;
|
||||||
}
|
}
|
||||||
vlen--;
|
vlen--;
|
||||||
while (isspace(v[vlen-1])) {
|
while (isspace((unsigned char)v[vlen-1])) {
|
||||||
vlen--;
|
vlen--;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -927,7 +927,7 @@ fetch_ssl_tolower(char in)
|
|||||||
* conversions.
|
* conversions.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
fetch_ssl_isalpha(char in)
|
fetch_ssl_isalpha(unsigned char in)
|
||||||
{
|
{
|
||||||
return ((in >= 'A' && in <= 'Z') || (in >= 'a' && in <= 'z'));
|
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] == '-')
|
if (!len || l[0] == '-' || l[len-1] == '-')
|
||||||
return (0);
|
return (0);
|
||||||
for (i = 0; i < len; ++i) {
|
for (i = 0; i < len; ++i) {
|
||||||
if (!isdigit(l[i]) &&
|
if (!isdigit((unsigned char)l[i]) &&
|
||||||
!fetch_ssl_isalpha(l[i]) &&
|
!fetch_ssl_isalpha((unsigned char)l[i]) &&
|
||||||
!(l[i] == '*' && wcok) &&
|
!(l[i] == '*' && wcok) &&
|
||||||
!(l[i] == '-' && l[i - 1] != '-'))
|
!(l[i] == '-' && l[i - 1] != '-'))
|
||||||
return (0);
|
return (0);
|
||||||
|
@ -55,7 +55,7 @@ static bool is_revision(const char *str) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
/* allow underscore for accepting perl-Digest-1.17_01_1 etc. */
|
/* 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;
|
++str;
|
||||||
}
|
}
|
||||||
return str[0] == '\0';
|
return str[0] == '\0';
|
||||||
|
Loading…
Reference in New Issue
Block a user