summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_event.c
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2009-09-12 20:03:45 +0000
committerrwatson <rwatson@FreeBSD.org>2009-09-12 20:03:45 +0000
commit53eaed07bcf1ec0f1a38e0b490d95f1ee307055a (patch)
treea4c213c079a55cd47cd1026ebfbedf0f22cafea1 /sys/kern/kern_event.c
parentdb3ff4e5c03b76a4899555f3db282820ce0c3470 (diff)
downloadFreeBSD-src-53eaed07bcf1ec0f1a38e0b490d95f1ee307055a.zip
FreeBSD-src-53eaed07bcf1ec0f1a38e0b490d95f1ee307055a.tar.gz
Use C99 initialization for struct filterops.
Obtained from: Mac OS X Sponsored by: Apple Inc. MFC after: 3 weeks
Diffstat (limited to 'sys/kern/kern_event.c')
-rw-r--r--sys/kern/kern_event.c35
1 files changed, 25 insertions, 10 deletions
diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c
index 6603d11..6336049 100644
--- a/sys/kern/kern_event.c
+++ b/sys/kern/kern_event.c
@@ -142,15 +142,28 @@ static int filt_timerattach(struct knote *kn);
static void filt_timerdetach(struct knote *kn);
static int filt_timer(struct knote *kn, long hint);
-static struct filterops file_filtops =
- { 1, filt_fileattach, NULL, NULL };
-static struct filterops kqread_filtops =
- { 1, NULL, filt_kqdetach, filt_kqueue };
+static struct filterops file_filtops = {
+ .f_isfd = 1,
+ .f_attach = filt_fileattach,
+};
+static struct filterops kqread_filtops = {
+ .f_isfd = 1,
+ .f_detach = filt_kqdetach,
+ .f_event = filt_kqueue,
+};
/* XXX - move to kern_proc.c? */
-static struct filterops proc_filtops =
- { 0, filt_procattach, filt_procdetach, filt_proc };
-static struct filterops timer_filtops =
- { 0, filt_timerattach, filt_timerdetach, filt_timer };
+static struct filterops proc_filtops = {
+ .f_isfd = 0,
+ .f_attach = filt_procattach,
+ .f_detach = filt_procdetach,
+ .f_event = filt_proc,
+};
+static struct filterops timer_filtops = {
+ .f_isfd = 0,
+ .f_attach = filt_timerattach,
+ .f_detach = filt_timerdetach,
+ .f_event = filt_timer,
+};
static uma_zone_t knote_zone;
static int kq_ncallouts = 0;
@@ -228,8 +241,10 @@ filt_nullattach(struct knote *kn)
return (ENXIO);
};
-struct filterops null_filtops =
- { 0, filt_nullattach, NULL, NULL };
+struct filterops null_filtops = {
+ .f_isfd = 0,
+ .f_attach = filt_nullattach,
+};
/* XXX - make SYSINIT to add these, and move into respective modules. */
extern struct filterops sig_filtops;
OpenPOWER on IntegriCloud