From 5c354823d87ebf4abd8b162b9bf8166d0f77df6f Mon Sep 17 00:00:00 2001 From: Varun Wadekar Date: Mon, 27 Sep 2021 06:01:09 -0700 Subject: fix(cactus_tests/ffa): dynamically calculate array size This patch uses the ARRAY_SIZE() macro to calculate the number of elements in the 'ffa_expected_partition_info' array instead of hard-coding to '4'. Signed-off-by: Varun Wadekar Change-Id: Ia0f19785b99e4b645ffa2ca61705f2329640a130 --- spm/cactus/cactus_tests/cactus_test_ffa.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'spm/cactus/cactus_tests') diff --git a/spm/cactus/cactus_tests/cactus_test_ffa.c b/spm/cactus/cactus_tests/cactus_test_ffa.c index 2dc264e..c580ee4 100644 --- a/spm/cactus/cactus_tests/cactus_test_ffa.c +++ b/spm/cactus/cactus_tests/cactus_test_ffa.c @@ -121,7 +121,8 @@ static void ffa_partition_info_get_test(struct mailbox_buffers *mb) &ffa_expected_partition_info[0], 1), true); expect(ffa_partition_info_helper(mb, null_uuid, - ffa_expected_partition_info, 4), true); + ffa_expected_partition_info, + ARRAY_SIZE(ffa_expected_partition_info)), true); ffa_partition_info_wrong_test(); -- cgit v1.2.3