From 2e2067b815b0fc96f357abc8cd54eedd8148c44d Mon Sep 17 00:00:00 2001 From: Eugeniu Rosca Date: Tue, 14 Aug 2018 02:43:04 +0200 Subject: [PATCH] common: avb_verify: Fix invalid 'for' loop condition MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Fix below compiler [1] warning: common/avb_verify.c: In function ‘avb_find_dm_args’: common/avb_verify.c:179:30: warning: left-hand operand of comma expression has no effect [-Wunused-value] for (i = 0; i < AVB_MAX_ARGS, args[i]; ++i) { [1] aarch64-linux-gnu-gcc (Linaro GCC 7.2-2017.11) Signed-off-by: Eugeniu Rosca Reviewed-by: Igor Opaniuk --- common/avb_verify.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/avb_verify.c b/common/avb_verify.c index 82ddebcfc2..52b91a825a 100644 --- a/common/avb_verify.c +++ b/common/avb_verify.c @@ -176,7 +176,7 @@ static int avb_find_dm_args(char **args, char *str) if (!str) return -1; - for (i = 0; i < AVB_MAX_ARGS, args[i]; ++i) { + for (i = 0; i < AVB_MAX_ARGS && args[i]; ++i) { if (strstr(args[i], str)) return i; } -- 2.39.5