X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=examples%2Fstandalone%2Fsmc911x_eeprom.c;h=2c05ed902d0c55734fc6f13784eaed4de9e93105;hb=fc15b9beed05dec6cc092c265042381a0eadb0e9;hp=00e826689f31b5001d3a3846c74088fab29254a4;hpb=93502a5e0adcfc0ce6cf8e3daa7eb9a4f4e53658;p=oweals%2Fu-boot.git diff --git a/examples/standalone/smc911x_eeprom.c b/examples/standalone/smc911x_eeprom.c index 00e826689f..2c05ed902d 100644 --- a/examples/standalone/smc911x_eeprom.c +++ b/examples/standalone/smc911x_eeprom.c @@ -9,13 +9,15 @@ * Based on smc91111_eeprom.c which: * Heavily borrowed from the following peoples GPL'ed software: * - Wolfgang Denk, DENX Software Engineering, wd@denx.de - * Das U-boot + * Das U-Boot * - Ladislav Michl ladis@linux-mips.org * A rejected patch on the U-Boot mailing list */ #include +#include #include +#include #include "../drivers/net/smc911x.h" /** @@ -128,7 +130,7 @@ static int write_eeprom_reg(struct eth_device *dev, u8 value, u8 reg) */ static char *skip_space(char *buf) { - while (buf[0] == ' ' || buf[0] == '\t') + while (isblank(buf[0])) ++buf; return buf; } @@ -357,7 +359,7 @@ int smc911x_eeprom(int argc, char * const argv[]) continue; /* Only accept 1 letter commands */ - if (line[0] && line[1] && line[1] != ' ' && line[1] != '\t') + if (line[0] && line[1] && !isblank(line[1])) goto unknown_cmd; /* Now parse the command */