(submit/fix-char-signedness) os: access: fix char signess mismatch
On NetBSD gives warning:
In file included from /usr/include/ctype.h:100,
from ../include/misc.h:174,
from ../os/access.c:96:
../os/access.c: In function ‘ResetHosts’:
../os/access.c:981:49: warning: array subscript has type ‘char’ [-Wchar-subscripts]
981 | lhostname[i] = tolower(ohostname[i]);
| ^
This commit is contained in:
parent
049c945be7
commit
f4035b7fe0
|
|
@ -978,7 +978,7 @@ ResetHosts(const char *display)
|
||||||
*ptr = 0;
|
*ptr = 0;
|
||||||
hostlen = strlen(ohostname) + 1;
|
hostlen = strlen(ohostname) + 1;
|
||||||
for (i = 0; i < hostlen; i++)
|
for (i = 0; i < hostlen; i++)
|
||||||
lhostname[i] = tolower(ohostname[i]);
|
lhostname[i] = tolower((unsigned char)ohostname[i]);
|
||||||
hostname = ohostname;
|
hostname = ohostname;
|
||||||
if (!strncmp("local:", lhostname, 6)) {
|
if (!strncmp("local:", lhostname, 6)) {
|
||||||
family = FamilyLocalHost;
|
family = FamilyLocalHost;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue