summaryrefslogtreecommitdiff
path: root/xserver/hw/xfree86/os-support/bsd/bsd_apm.c
diff options
context:
space:
mode:
Diffstat (limited to 'xserver/hw/xfree86/os-support/bsd/bsd_apm.c')
-rw-r--r--xserver/hw/xfree86/os-support/bsd/bsd_apm.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/xserver/hw/xfree86/os-support/bsd/bsd_apm.c b/xserver/hw/xfree86/os-support/bsd/bsd_apm.c
index 60a19d79a..dab0a9a7d 100644
--- a/xserver/hw/xfree86/os-support/bsd/bsd_apm.c
+++ b/xserver/hw/xfree86/os-support/bsd/bsd_apm.c
@@ -37,14 +37,12 @@ static struct {
#endif
};
-#define numApmEvents (sizeof(bsdToXF86Array) / sizeof(bsdToXF86Array[0]))
-
static pmEvent
bsdToXF86(int type)
{
int i;
- for (i = 0; i < numApmEvents; i++) {
+ for (i = 0; i < ARRAY_SIZE(bsdToXF86Array); i++) {
if (type == bsdToXF86Array[i].apmBsd) {
return bsdToXF86Array[i].xf86;
}