summaryrefslogtreecommitdiff
path: root/sys/arch/macppc
diff options
context:
space:
mode:
authorVisa Hankala <visa@cvs.openbsd.org>2019-12-31 13:48:33 +0000
committerVisa Hankala <visa@cvs.openbsd.org>2019-12-31 13:48:33 +0000
commite1d46407d705bb612ebbeebddbe85779b52a42a5 (patch)
treeb128da7e2130d5eeae1d5918b1cc8692523d852b /sys/arch/macppc
parenta2985aa5fb51f9899868daaf2cde0dfa5a0f449f (diff)
Use C99 designated initializers with struct filterops. In addition,
make the structs const so that the data are put in .rodata. OK mpi@, deraadt@, anton@, bluhm@
Diffstat (limited to 'sys/arch/macppc')
-rw-r--r--sys/arch/macppc/dev/apm.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/arch/macppc/dev/apm.c b/sys/arch/macppc/dev/apm.c
index 92caa63e764..86eb7dc58fd 100644
--- a/sys/arch/macppc/dev/apm.c
+++ b/sys/arch/macppc/dev/apm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: apm.c,v 1.19 2016/12/05 15:04:15 fcambus Exp $ */
+/* $OpenBSD: apm.c,v 1.20 2019/12/31 13:48:31 visa Exp $ */
/*-
* Copyright (c) 2001 Alexander Guy. All rights reserved.
@@ -85,8 +85,12 @@ void filt_apmrdetach(struct knote *kn);
int filt_apmread(struct knote *kn, long hint);
int apmkqfilter(dev_t dev, struct knote *kn);
-struct filterops apmread_filtops =
- { 1, NULL, filt_apmrdetach, filt_apmread};
+const struct filterops apmread_filtops = {
+ .f_isfd = 1,
+ .f_attach = NULL,
+ .f_detach = filt_apmrdetach,
+ .f_event = filt_apmread,
+};
/*
* Flags to control kernel display