remove trailing whitespace
[coreboot.git] / util / nvramtool / cli / nvramtool.c
index 9bc3e4e5251e3a32b05c5cb4600d2e9b40433de6..11a1a702afcf1a754330c9153efcd5e9986ee3bc 100644 (file)
@@ -140,13 +140,13 @@ int main(int argc, char *argv[])
                        fprintf(stderr, "Couldn't stat '%s'\n", nvramtool_op_modifiers[NVRAMTOOL_MOD_USE_CMOS_FILE].param);
                        exit(1);
                }
-               
+
                if (fd_stat.st_size < 128) {
                        lseek(fd, 127, SEEK_SET);
                        write(fd, "\0", 1);
                        fsync(fd);
                }
-               
+
                cmos_default = mmap(NULL, 128, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
                if (cmos_default == MAP_FAILED) {
                        fprintf(stderr, "Couldn't map '%s'\n", nvramtool_op_modifiers[NVRAMTOOL_MOD_USE_CMOS_FILE].param);
@@ -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);