diff options
author | Visa Hankala <visa@cvs.openbsd.org> | 2019-12-31 13:48:33 +0000 |
---|---|---|
committer | Visa Hankala <visa@cvs.openbsd.org> | 2019-12-31 13:48:33 +0000 |
commit | e1d46407d705bb612ebbeebddbe85779b52a42a5 (patch) | |
tree | b128da7e2130d5eeae1d5918b1cc8692523d852b /sys/arch/arm64 | |
parent | a2985aa5fb51f9899868daaf2cde0dfa5a0f449f (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/arm64')
-rw-r--r-- | sys/arch/arm64/dev/apm.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/arch/arm64/dev/apm.c b/sys/arch/arm64/dev/apm.c index 48fee1144af..85b2ea7c75a 100644 --- a/sys/arch/arm64/dev/apm.c +++ b/sys/arch/arm64/dev/apm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: apm.c,v 1.1 2019/01/23 09:57:36 phessler Exp $ */ +/* $OpenBSD: apm.c,v 1.2 2019/12/31 13:48:31 visa Exp $ */ /*- * Copyright (c) 2001 Alexander Guy. All rights reserved. @@ -87,8 +87,12 @@ int filt_apmread(struct knote *kn, long hint); int apmkqfilter(dev_t dev, struct knote *kn); int apm_getdefaultinfo(struct apm_power_info *); -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, +}; int (*get_apminfo)(struct apm_power_info *) = apm_getdefaultinfo; |