aboutsummaryrefslogtreecommitdiff
path: root/hw/sb16.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/sb16.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/sb16.c')
-rw-r--r--hw/sb16.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/hw/sb16.c b/hw/sb16.c
index 8a0fafe63f..ad246ea3c9 100644
--- a/hw/sb16.c
+++ b/hw/sb16.c
@@ -27,8 +27,6 @@
#include "isa.h"
#include "qemu-timer.h"
-#define LENOFA(a) ((int) (sizeof(a)/sizeof(a[0])))
-
#define dolog(...) AUD_log ("sb16", __VA_ARGS__)
/* #define DEBUG */
@@ -1440,11 +1438,11 @@ int SB16_init (AudioState *audio, qemu_irq *pic)
dolog ("warning: Could not create auxiliary timer\n");
}
- for (i = 0; i < LENOFA (dsp_write_ports); i++) {
+ for (i = 0; i < ARRAY_SIZE (dsp_write_ports); i++) {
register_ioport_write (s->port + dsp_write_ports[i], 1, 1, dsp_write, s);
}
- for (i = 0; i < LENOFA (dsp_read_ports); i++) {
+ for (i = 0; i < ARRAY_SIZE (dsp_read_ports); i++) {
register_ioport_read (s->port + dsp_read_ports[i], 1, 1, dsp_read, s);
}