summary refs log tree commit diff stats
path: root/hw/sm501.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/sm501.c')
-rw-r--r--hw/sm501.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/sm501.c b/hw/sm501.c
index 54d176b83f..0d6b08b84c 100644
--- a/hw/sm501.c
+++ b/hw/sm501.c
@@ -514,7 +514,7 @@ static uint32_t get_local_mem_size_index(uint32_t size)
     uint32_t norm_size = 0;
     int i, index = 0;
 
-    for (i = 0; i < sizeof(sm501_mem_local_size)/sizeof(uint32_t); i++) {
+    for (i = 0; i < ARRAY_SIZE(sm501_mem_local_size); i++) {
 	uint32_t new_size = sm501_mem_local_size[i];
 	if (new_size >= size) {
 	    if (norm_size == 0 || norm_size > new_size) {