]> Git Repo - linux.git/commitdiff
kconfig: remove redundant check in expr_join_or()
authorMasahiro Yamada <[email protected]>
Sun, 19 May 2024 13:34:02 +0000 (22:34 +0900)
committerMasahiro Yamada <[email protected]>
Wed, 29 May 2024 07:40:03 +0000 (16:40 +0900)
The check for 'sym1 == sym2' is redundant here because it has already
been done a few lines above:

    if (sym1 != sym2)
            return NULL;

Signed-off-by: Masahiro Yamada <[email protected]>
scripts/kconfig/expr.c

index a290de36307ba8abe184a915fb0a6b6a3b29bbb6..4d95fce5f9a7ab7c421c2829c59305738e66a010 100644 (file)
@@ -476,7 +476,7 @@ static struct expr *expr_join_or(struct expr *e1, struct expr *e2)
                        return expr_alloc_comp(E_UNEQUAL, sym1, &symbol_yes);
                }
        }
-       if (sym1->type == S_BOOLEAN && sym1 == sym2) {
+       if (sym1->type == S_BOOLEAN) {
                if ((e1->type == E_NOT && e1->left.expr->type == E_SYMBOL && e2->type == E_SYMBOL) ||
                    (e2->type == E_NOT && e2->left.expr->type == E_SYMBOL && e1->type == E_SYMBOL))
                        return expr_alloc_symbol(&symbol_yes);
This page took 0.064213 seconds and 4 git commands to generate.