Merge branch '1902-bind-build-problems-on-netbsd-9-v9_16' into 'v9_16'

[v9_16] Fix "array subscript is of type 'char'"

See merge request isc-projects/bind9!3660
This commit is contained in:
Michal Nowak 2020-06-04 14:28:11 +00:00
commit 7c8cfe38be
2 changed files with 5 additions and 4 deletions

View file

@ -355,11 +355,12 @@ save_command_line(int argc, char *argv[]) {
*dst++ = ' ';
while (*src != '\0' && dst < eob) {
if (isalnum(*src) || *src == ',' || *src == '-' ||
*src == '_' || *src == '.' || *src == '/')
if (isalnum(*(unsigned char *)src) || *src == ',' ||
*src == '-' || *src == '_' || *src == '.' ||
*src == '/')
{
*dst++ = *src++;
} else if (isprint(*src)) {
} else if (isprint(*(unsigned char *)src)) {
if (dst + 2 >= eob) {
goto add_ellipsis;
}

View file

@ -1283,7 +1283,7 @@ parse_duration(cfg_parser_t *pctx, cfg_obj_t **ret) {
duration.unlimited = false;
if (toupper(TOKEN_STRING(pctx)[0]) == 'P') {
if (toupper((unsigned char)TOKEN_STRING(pctx)[0]) == 'P') {
result = duration_fromtext(&pctx->token.value.as_textregion,
&duration);
duration.iso8601 = true;