X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=examples%2Fstandalone%2Fsmc911x_eeprom.c;h=6c79c5f65a0f74236f46c1f0da26612d3705d435;hb=1c1c7506de1051df6d81c51a06a57be6406b534c;hp=00e826689f31b5001d3a3846c74088fab29254a4;hpb=93502a5e0adcfc0ce6cf8e3daa7eb9a4f4e53658;p=u-boot diff --git a/examples/standalone/smc911x_eeprom.c b/examples/standalone/smc911x_eeprom.c index 00e826689f..6c79c5f65a 100644 --- a/examples/standalone/smc911x_eeprom.c +++ b/examples/standalone/smc911x_eeprom.c @@ -16,6 +16,7 @@ #include #include +#include #include "../drivers/net/smc911x.h" /** @@ -128,7 +129,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 +358,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 */