1
0
Fork 0

tools: env: fw_string_blank: return from loop when item found

Signed-off-by: Andreas Fenkart <andreas.fenkart@digitalstrom.com>
utp
Andreas Fenkart 2016-03-11 09:39:36 +01:00 committed by Tom Rini
parent 10667e15f4
commit 9583efcc74
1 changed files with 2 additions and 5 deletions

7
tools/env/fw_env.c vendored
View File

@ -141,13 +141,10 @@ static char *fw_string_blank(char *s, int noblank)
for (i = 0; i < len; i++, s++) {
if ((noblank && !isblank(*s)) ||
(!noblank && isblank(*s)))
break;
}
if (i == len)
return NULL;
return s;
}
return NULL;
}
/*
* Search the environment for a variable.