qemu-trivial
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-trivial] [PATCH 24/29] tests/acpi: use ARRAY_SIZE macro


From: Philippe Mathieu-Daudé
Subject: [Qemu-trivial] [PATCH 24/29] tests/acpi: use ARRAY_SIZE macro
Date: Tue, 18 Jul 2017 03:10:00 -0300

Applied using the Coccinelle semantic patch scripts/coccinelle/use_osdep.cocci

Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
---
 tests/acpi-utils.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/acpi-utils.h b/tests/acpi-utils.h
index f8d87236c6..91ee0a273d 100644
--- a/tests/acpi-utils.h
+++ b/tests/acpi-utils.h
@@ -58,7 +58,7 @@ typedef struct {
     } while (0);
 
 #define ACPI_READ_ARRAY(arr, addr)                               \
-    ACPI_READ_ARRAY_PTR(arr, sizeof(arr) / sizeof(arr[0]), addr)
+    ACPI_READ_ARRAY_PTR(arr, ARRAY_SIZE(arr), addr)
 
 #define ACPI_READ_TABLE_HEADER(table, addr)                      \
     do {                                                         \
-- 
2.13.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]