aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorJason Hobbs <jason.hobbs@calxeda.com>2011-08-23 11:06:54 +0000
committerWolfgang Denk <wd@denx.de>2011-10-17 22:25:34 +0200
commit4d91a6ecabd10652abba696e55e952676db0aae1 (patch)
tree27336d763e25ab047dc39c4b0c1a82a7bfc1d6ce /examples
parentce2d4c9532b338e39f033ef75ae57bcb71c3389e (diff)
downloadu-boot-linaro-stable-4d91a6ecabd10652abba696e55e952676db0aae1.tar.gz
Replace space and tab checks with isblank
These are various places I found that checked for conditions equivalent to isblank. Signed-off-by: Jason Hobbs <jason.hobbs@calxeda.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/standalone/smc911x_eeprom.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/standalone/smc911x_eeprom.c b/examples/standalone/smc911x_eeprom.c
index 00e826689..6c79c5f65 100644
--- a/examples/standalone/smc911x_eeprom.c
+++ b/examples/standalone/smc911x_eeprom.c
@@ -16,6 +16,7 @@
#include <common.h>
#include <exports.h>
+#include <linux/ctype.h>
#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 */