diff options
| author | maya <maya@NetBSD.org> | 2017-10-25 08:12:37 +0000 |
|---|---|---|
| committer | maya <maya@NetBSD.org> | 2017-10-25 08:12:37 +0000 |
| commit | 4aa34cd6ca3cea8b38afc3778c72693e1c6089dc (patch) | |
| tree | 8735a8ea01531df3a5150074a688e92467f9dcd1 /sys/dev/sequencer.c | |
| parent | 3a28b8238263bbcdcffd68f8cb1c35b752a059c7 (diff) | |
Use C99 initializer for filterops
Mostly done with spatch with touchups for indentation
@@
expression a;
identifier b,c,d;
identifier p;
@@
const struct filterops p =
- { a, b, c, d
+ {
+ .f_isfd = a,
+ .f_attach = b,
+ .f_detach = c,
+ .f_event = d,
};
Diffstat (limited to 'sys/dev/sequencer.c')
| -rw-r--r-- | sys/dev/sequencer.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/sys/dev/sequencer.c b/sys/dev/sequencer.c index 2e673e262be..5ec87fe0065 100644 --- a/sys/dev/sequencer.c +++ b/sys/dev/sequencer.c @@ -1,4 +1,4 @@ -/* $NetBSD: sequencer.c,v 1.66 2017/06/01 09:44:30 pgoyette Exp $ */ +/* $NetBSD: sequencer.c,v 1.67 2017/10/25 08:12:38 maya Exp $ */ /* * Copyright (c) 1998, 2008 The NetBSD Foundation, Inc. @@ -55,7 +55,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: sequencer.c,v 1.66 2017/06/01 09:44:30 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sequencer.c,v 1.67 2017/10/25 08:12:38 maya Exp $"); #ifdef _KERNEL_OPT #include "sequencer.h" @@ -912,8 +912,12 @@ filt_sequencerread(struct knote *kn, long hint) return rv; } -static const struct filterops sequencerread_filtops = - { 1, NULL, filt_sequencerrdetach, filt_sequencerread }; +static const struct filterops sequencerread_filtops = { + .f_isfd = 1, + .f_attach = NULL, + .f_detach = filt_sequencerrdetach, + .f_event = filt_sequencerread, +}; static void filt_sequencerwdetach(struct knote *kn) @@ -946,8 +950,12 @@ filt_sequencerwrite(struct knote *kn, long hint) return rv; } -static const struct filterops sequencerwrite_filtops = - { 1, NULL, filt_sequencerwdetach, filt_sequencerwrite }; +static const struct filterops sequencerwrite_filtops = { + .f_isfd = 1, + .f_attach = NULL, + .f_detach = filt_sequencerwdetach, + .f_event = filt_sequencerwrite, +}; static int sequencerkqfilter(dev_t dev, struct knote *kn) |
