Fix: negate the condition for is-vendor-board-qcom
Bug: 193540681
Test: internal
Change-Id: Ia4087574f7cbcd5282687234892314c9a5fcc174
diff --git a/mk2rbc/mk2rbc.go b/mk2rbc/mk2rbc.go
index 6227164..d4ff585 100644
--- a/mk2rbc/mk2rbc.go
+++ b/mk2rbc/mk2rbc.go
@@ -1167,10 +1167,12 @@
return ctx.newBadExpr(directive,
fmt.Sprintf("the result of %s can be compared only to empty", x.name)), true
}
+ // if the expression is ifneq (,$(call is-vendor-board-platform,...)), negate==true,
+ // so we should set inExpr.isNot to false
return &inExpr{
expr: &variableRefExpr{ctx.addVariable("TARGET_BOARD_PLATFORM"), false},
list: &variableRefExpr{ctx.addVariable("QCOM_BOARD_PLATFORMS"), true},
- isNot: negate,
+ isNot: !negate,
}, true
default:
return ctx.newBadExpr(directive, "Unknown function in ifeq: %s", x.name), true