summaryrefslogtreecommitdiff
path: root/xserver/hw/xfree86/os-support/bsd/bsd_kqueue_apm.c
diff options
context:
space:
mode:
Diffstat (limited to 'xserver/hw/xfree86/os-support/bsd/bsd_kqueue_apm.c')
-rw-r--r--xserver/hw/xfree86/os-support/bsd/bsd_kqueue_apm.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/xserver/hw/xfree86/os-support/bsd/bsd_kqueue_apm.c b/xserver/hw/xfree86/os-support/bsd/bsd_kqueue_apm.c
index 8e9d09384..6911e360e 100644
--- a/xserver/hw/xfree86/os-support/bsd/bsd_kqueue_apm.c
+++ b/xserver/hw/xfree86/os-support/bsd/bsd_kqueue_apm.c
@@ -70,14 +70,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;
}