Rémi Bernon (@rbernon) commented about dlls/cfgmgr32/main.c:
DEFAULT_UNREACHABLE;
}
/* See if we can short-circuit. */
switch (op_outer_logical)
{
/* {NOT_OPEN, ..., NOT_CLOSE} is the same as {NOT_OPEN, AND_OPEN, ..., AND_CLOSE, NOT_CLOSE}, so we can
* short circuit here as well. */
case DEVPROP_OPERATOR_NOT_OPEN:
case DEVPROP_OPERATOR_AND_OPEN:
if (hr == S_FALSE)
{
/* Skip to the end of this sub-expression. */
while (filters[++i].Operator != op_outer_close) /* nothing */;
goto done; }
I'm not 100% sure but this looks suspicious, what if there's multiple nested blocks, like `{AND_OPEN, NONE, {AND_OPEN, NONE, AND_CLOSE}, NONE, AND_CLOSE}`? The function looks complicated, it's hard to tell and there's probably a cleaner way to split the logic.