mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-13 00:17:23 +00:00
fdtgrep: Simplify code to inverting the match
The code to invert the match in h_include() is a bit convoluted. Simplify it by using disp->invert only once. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
b1823ed171
commit
490afe7428
1 changed files with 2 additions and 8 deletions
|
@ -634,14 +634,8 @@ static int h_include(void *priv, const void *fdt, int offset, int type,
|
||||||
inc = 0;
|
inc = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (inc) {
|
if (inc != -1 && disp->invert)
|
||||||
case 1:
|
inc = !inc;
|
||||||
inc = !disp->invert;
|
|
||||||
break;
|
|
||||||
case 0:
|
|
||||||
inc = disp->invert;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
debug(" - returning %d\n", inc);
|
debug(" - returning %d\n", inc);
|
||||||
|
|
||||||
return inc;
|
return inc;
|
||||||
|
|
Loading…
Reference in a new issue