mirror of
https://github.com/fail0verflow/switch-coreboot.git
synced 2025-05-04 01:39:18 -04:00
Cast arguments to ctype(3) functions through (int)(unsigned char).
Signed-Off-By: Jonathan Kollasch <jakllsch@kollasch.net> Acked-By: Jonathan Kollasch <jakllsch@kollasch.net> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6519 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
parent
4c50cb2457
commit
1571dc9637
2 changed files with 3 additions and 3 deletions
|
@ -800,7 +800,7 @@ static int list_cmos_entry(const cmos_entry_t * e, int show_name)
|
||||||
case CMOS_ENTRY_STRING:
|
case CMOS_ENTRY_STRING:
|
||||||
w = (char *)(unsigned long)value;
|
w = (char *)(unsigned long)value;
|
||||||
while (*w) {
|
while (*w) {
|
||||||
if(!isprint(*w)) {
|
if(!isprint((int)(unsigned char)*w)) {
|
||||||
if (show_name)
|
if (show_name)
|
||||||
printf("# Bad value -> %s\n", e->name);
|
printf("# Bad value -> %s\n", e->name);
|
||||||
else
|
else
|
||||||
|
@ -846,7 +846,7 @@ static uint16_t convert_checksum_value(const char value[])
|
||||||
uint16_t result;
|
uint16_t result;
|
||||||
int negative;
|
int negative;
|
||||||
|
|
||||||
for (p = value; isspace(*p); p++) ;
|
for (p = value; isspace((int)(unsigned char)*p); p++) ;
|
||||||
|
|
||||||
negative = (*p == '-');
|
negative = (*p == '-');
|
||||||
n = strtoul(value, (char **)&p, 0);
|
n = strtoul(value, (char **)&p, 0);
|
||||||
|
|
|
@ -125,7 +125,7 @@ int prepare_cmos_write(const cmos_entry_t * e, const char value_str[],
|
||||||
/* See if the first character of 'value_str' (excluding
|
/* See if the first character of 'value_str' (excluding
|
||||||
* any initial whitespace) is a minus sign.
|
* any initial whitespace) is a minus sign.
|
||||||
*/
|
*/
|
||||||
for (p = value_str; isspace(*p); p++) ;
|
for (p = value_str; isspace((int)(unsigned char)*p); p++) ;
|
||||||
negative = (*p == '-');
|
negative = (*p == '-');
|
||||||
|
|
||||||
out = strtoull(value_str, (char **)&p, 0);
|
out = strtoull(value_str, (char **)&p, 0);
|
||||||
|
|
Loading…
Add table
Reference in a new issue