conf: cast to unsigned char for character handling function

Character handling functions, like isspace(3), expect a value
representable as unsigned char or equal to EOF.  Otherwise the behavior
is undefined.

See https://wiki.sei.cmu.edu/confluence/display/c/STR37-C.+Arguments+to+character-handling+functions+must+be+representable+as+an+unsigned+char
This commit is contained in:
Christian Göttsche 2023-08-07 12:46:15 +02:00 committed by Dmitry V. Levin
parent dc9427961a
commit 2770046cd8

View File

@ -72,7 +72,7 @@ line
/* make sure we have lower case */
for (i=0; $1[i]; ++i) {
$1[i] = tolower($1[i]);
$1[i] = tolower((unsigned char)$1[i]);
}
/* $1 = service-name */