aboutsummaryrefslogtreecommitdiff
path: root/hw/sm501.c
diff options
context:
space:
mode:
authormalc <malc@c046a42c-6fe2-441c-8c8c-71466251a162>2008-12-22 20:33:55 +0000
committermalc <malc@c046a42c-6fe2-441c-8c8c-71466251a162>2008-12-22 20:33:55 +0000
commitb1503cda1e78cad4dca522ddbb4c69f4c6869bcd (patch)
tree26edd30543fcb27ae90f8762558ea878df42ec57 /hw/sm501.c
parent5626b017d623cb88d973b53bca11613c766b1715 (diff)
Use the ARRAY_SIZE() macro where appropriate.
Change from v1: Avoid changing the existing coding style in certain files. Signed-off-by: Stuart Brady <stuart.brady@gmail.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6120 c046a42c-6fe2-441c-8c8c-71466251a162
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) {