[coreboot] [commit] r6519 - in trunk/util/nvramtool: . cli
repository service
svn at coreboot.org
Tue Apr 19 21:34:26 CEST 2011
Author: jakllsch
Date: Tue Apr 19 21:34:25 2011
New Revision: 6519
URL: https://tracker.coreboot.org/trac/coreboot/changeset/6519
Log:
Cast arguments to ctype(3) functions through (int)(unsigned char).
Signed-Off-By: Jonathan Kollasch <jakllsch at kollasch.net>
Acked-By: Jonathan Kollasch <jakllsch at kollasch.net>
Modified:
trunk/util/nvramtool/cli/nvramtool.c
trunk/util/nvramtool/cmos_ops.c
Modified: trunk/util/nvramtool/cli/nvramtool.c
==============================================================================
--- trunk/util/nvramtool/cli/nvramtool.c Tue Apr 19 21:21:27 2011 (r6518)
+++ trunk/util/nvramtool/cli/nvramtool.c Tue Apr 19 21:34:25 2011 (r6519)
@@ -800,7 +800,7 @@
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 @@
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);
Modified: trunk/util/nvramtool/cmos_ops.c
==============================================================================
--- trunk/util/nvramtool/cmos_ops.c Tue Apr 19 21:21:27 2011 (r6518)
+++ trunk/util/nvramtool/cmos_ops.c Tue Apr 19 21:34:25 2011 (r6519)
@@ -125,7 +125,7 @@
/* 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);
More information about the coreboot
mailing list