From 4d91a6ecabd10652abba696e55e952676db0aae1 Mon Sep 17 00:00:00 2001 From: Jason Hobbs Date: Tue, 23 Aug 2011 11:06:54 +0000 Subject: 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 --- common/main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'common/main.c') 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 +#include #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 */ -- cgit v1.1