aboutsummaryrefslogtreecommitdiff
path: root/hw/ac97.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/ac97.c')
-rw-r--r--hw/ac97.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/ac97.c b/hw/ac97.c
index c30e894074..dc9a165a31 100644
--- a/hw/ac97.c
+++ b/hw/ac97.c
@@ -1196,7 +1196,7 @@ static void ac97_save (QEMUFile *f, void *opaque)
qemu_put_be32s (f, &s->glob_sta);
qemu_put_be32s (f, &s->cas);
- for (i = 0; i < sizeof (s->bm_regs) / sizeof (s->bm_regs[0]); ++i) {
+ for (i = 0; i < ARRAY_SIZE (s->bm_regs); ++i) {
AC97BusMasterRegs *r = &s->bm_regs[i];
qemu_put_be32s (f, &r->bdbar);
qemu_put_8s (f, &r->civ);
@@ -1235,7 +1235,7 @@ static int ac97_load (QEMUFile *f, void *opaque, int version_id)
qemu_get_be32s (f, &s->glob_sta);
qemu_get_be32s (f, &s->cas);
- for (i = 0; i < sizeof (s->bm_regs) / sizeof (s->bm_regs[0]); ++i) {
+ for (i = 0; i < ARRAY_SIZE (s->bm_regs); ++i) {
AC97BusMasterRegs *r = &s->bm_regs[i];
qemu_get_be32s (f, &r->bdbar);
qemu_get_8s (f, &r->civ);