aboutsummaryrefslogtreecommitdiff
path: root/tools/env
diff options
context:
space:
mode:
authorAndreas Fenkart <andreas.fenkart@digitalstrom.com>2016-03-11 09:39:35 +0100
committerTom Rini <trini@konsulko.com>2016-03-26 18:49:29 -0400
commit10667e15f48613e264a4da78a36bbd7daf5c4ce8 (patch)
tree0b78c7edea1e7f64d2903490e6805ffe47ca4b87 /tools/env
parentadcc90b4014e683c06af95f48b247b755e9381d7 (diff)
downloadu-boot-10667e15f48613e264a4da78a36bbd7daf5c4ce8.zip
u-boot-10667e15f48613e264a4da78a36bbd7daf5c4ce8.tar.gz
u-boot-10667e15f48613e264a4da78a36bbd7daf5c4ce8.tar.bz2
tools: env: replace WHITESPACE macro by isblank
Signed-off-by: Andreas Fenkart <andreas.fenkart@digitalstrom.com>
Diffstat (limited to 'tools/env')
-rw-r--r--tools/env/fw_env.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/tools/env/fw_env.c b/tools/env/fw_env.c
index ee17a69..bded9f6 100644
--- a/tools/env/fw_env.c
+++ b/tools/env/fw_env.c
@@ -15,6 +15,7 @@
#include <env_flags.h>
#include <fcntl.h>
#include <linux/stringify.h>
+#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <stddef.h>
@@ -36,8 +37,6 @@
#define DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d))
-#define WHITESPACE(c) ((c == '\t') || (c == ' '))
-
#define min(x, y) ({ \
typeof(x) _min1 = (x); \
typeof(y) _min2 = (y); \
@@ -140,8 +139,8 @@ static char *fw_string_blank(char *s, int noblank)
int len = strlen(s);
for (i = 0; i < len; i++, s++) {
- if ((noblank && !WHITESPACE(*s)) ||
- (!noblank && WHITESPACE(*s)))
+ if ((noblank && !isblank(*s)) ||
+ (!noblank && isblank(*s)))
break;
}
if (i == len)