From: Andreas Fenkart Date: Fri, 11 Mar 2016 08:39:36 +0000 (+0100) Subject: tools: env: fw_string_blank: return from loop when item found X-Git-Tag: v2025.01-rc5-pxa1908~9811 X-Git-Url: http://git.dujemihanovic.xyz/%22/img/sics.gif/%22/static/git-favicon.png?a=commitdiff_plain;h=9583efcc74f9e781773706126315d4e9f8c9d43e;p=u-boot.git tools: env: fw_string_blank: return from loop when item found Signed-off-by: Andreas Fenkart --- diff --git a/tools/env/fw_env.c b/tools/env/fw_env.c index bded9f64c7..0a438a3be4 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; } /*