There is no point in checking for *p == 0 in the while loop,
after over the blanks, then checking for the parameters, if
find, return true, otherwise continue check the parameters,
if to the end of the cmdline, return false.
Signed-off-by: Xuguo Wang <huddy1985@gmail.com>
[Jan: also removed curly braces]
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
while (1) {
/* read over leading blanks */
- while (*p == ' ') {
- if (*p == 0)
- return false;
+ while (*p == ' ')
p++;
- }
if (strncmp(p, param, param_len) == 0) {
p += param_len;