summaryrefslogtreecommitdiff
path: root/tools/env
diff options
context:
space:
mode:
authorAndreas Fenkart <andreas.fenkart@digitalstrom.com>2016-03-11 09:39:36 +0100
committerTom Rini <trini@konsulko.com>2016-03-26 18:49:29 -0400
commit9583efcc74f9e781773706126315d4e9f8c9d43e (patch)
tree9ffc148806eba56adace962c6f81b30abef19836 /tools/env
parent10667e15f48613e264a4da78a36bbd7daf5c4ce8 (diff)
downloadu-boot-imx-9583efcc74f9e781773706126315d4e9f8c9d43e.zip
u-boot-imx-9583efcc74f9e781773706126315d4e9f8c9d43e.tar.gz
u-boot-imx-9583efcc74f9e781773706126315d4e9f8c9d43e.tar.bz2
tools: env: fw_string_blank: return from loop when item found
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, 2 insertions, 5 deletions
diff --git a/tools/env/fw_env.c b/tools/env/fw_env.c
index bded9f6..0a438a3 100644
--- a/tools/env/fw_env.c
+++ b/tools/env/fw_env.c
@@ -141,12 +141,9 @@ static char *fw_string_blank(char *s, int noblank)
for (i = 0; i < len; i++, s++) {
if ((noblank && !isblank(*s)) ||
(!noblank && isblank(*s)))
- break;
+ return s;
}
- if (i == len)
- return NULL;
-
- return s;
+ return NULL;
}
/*