summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/nvramtool/cli/nvramtool.c4
-rw-r--r--util/nvramtool/cmos_ops.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/util/nvramtool/cli/nvramtool.c b/util/nvramtool/cli/nvramtool.c
index 9bc3e4e525..bc929da698 100644
--- a/util/nvramtool/cli/nvramtool.c
+++ b/util/nvramtool/cli/nvramtool.c
@@ -800,7 +800,7 @@ static int list_cmos_entry(const cmos_entry_t * e, int show_name)
case CMOS_ENTRY_STRING:
w = (char *)(unsigned long)value;
while (*w) {
- if(!isprint(*w)) {
+ if(!isprint((int)(unsigned char)*w)) {
if (show_name)
printf("# Bad value -> %s\n", e->name);
else
@@ -846,7 +846,7 @@ static uint16_t convert_checksum_value(const char value[])
uint16_t result;
int negative;
- for (p = value; isspace(*p); p++) ;
+ for (p = value; isspace((int)(unsigned char)*p); p++) ;
negative = (*p == '-');
n = strtoul(value, (char **)&p, 0);
diff --git a/util/nvramtool/cmos_ops.c b/util/nvramtool/cmos_ops.c
index 86ffe1022b..2bbc8a1df6 100644
--- a/util/nvramtool/cmos_ops.c
+++ b/util/nvramtool/cmos_ops.c
@@ -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
* 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 == '-');
out = strtoull(value_str, (char **)&p, 0);