From a0a73f52ad5a33576fec69ab9d74c29fa4621aea Mon Sep 17 00:00:00 2001 From: Eugene Syromiatnikov Date: Tue, 12 Aug 2025 10:08:19 +0200 Subject: [PATCH] test/mem_alloc_test.c: tfix in test_xaligned_alloc Change "=" to "==" in "if ((exp == EXP_NONNULL) ...". Fixes: d090695101a9 "test: add a sanity test for memory allocation functions" Resolves: https://scan5.scan.coverity.com/#/project-view/65279/10222?selectedIssue=1662047 Resolves: https://scan5.scan.coverity.com/#/project-view/65279/10222?selectedIssue=1662049 Related: https://github.com/openssl/project/issues/1317 Signed-off-by: Eugene Syromiatnikov Reviewed-by: Tomas Mraz Reviewed-by: Shane Lontis Reviewed-by: Neil Horman (Merged from https://github.com/openssl/openssl/pull/28238) --- test/mem_alloc_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/mem_alloc_test.c b/test/mem_alloc_test.c index 899f49d2d47..0f305d27440 100644 --- a/test/mem_alloc_test.c +++ b/test/mem_alloc_test.c @@ -698,7 +698,7 @@ static int test_xaligned_alloc(const bool array, const bool macro, #if !defined(OPENSSL_SMALL_FOOTPRINT) if (IS_FAIL(exp) && !TEST_ptr_null(freeptr)) res = 0; - if ((exp = EXP_NONNULL) && !TEST_ptr(freeptr)) + if ((exp == EXP_NONNULL) && !TEST_ptr(freeptr)) res = 0; #else /* OPENSSL_SMALL_FOOTPRINT */ if (!TEST_ptr_null(ret) || !TEST_ptr_null(freeptr)) -- 2.47.3