summaryrefslogtreecommitdiff
path: root/common/main.c
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 /common/main.c
parentce2d4c9532b338e39f033ef75ae57bcb71c3389e (diff)
downloadu-boot-imx-4d91a6ecabd10652abba696e55e952676db0aae1.zip
u-boot-imx-4d91a6ecabd10652abba696e55e952676db0aae1.tar.gz
u-boot-imx-4d91a6ecabd10652abba696e55e952676db0aae1.tar.bz2
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 'common/main.c')
-rw-r--r--common/main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/common/main.c b/common/main.c
index d812aa1..7be2955 100644
--- a/common/main.c
+++ b/common/main.c
@@ -40,6 +40,7 @@
#endif
#include <post.h>
+#include <linux/ctype.h>
#if defined(CONFIG_SILENT_CONSOLE) || defined(CONFIG_POST) || defined(CONFIG_CMDLINE_EDITING)
DECLARE_GLOBAL_DATA_PTR;
@@ -1097,7 +1098,7 @@ int parse_line (char *line, char *argv[])
while (nargs < CONFIG_SYS_MAXARGS) {
/* skip any white space */
- while ((*line == ' ') || (*line == '\t'))
+ while (isblank(*line))
++line;
if (*line == '\0') { /* end of line, no more args */
@@ -1111,7 +1112,7 @@ int parse_line (char *line, char *argv[])
argv[nargs++] = line; /* begin of argument string */
/* find end of string */
- while (*line && (*line != ' ') && (*line != '\t'))
+ while (*line && !isblank(*line))
++line;
if (*line == '\0') { /* end of line, no more args */