summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre-Yves Ritschard <pyr@cvs.openbsd.org>2007-05-31 18:24:03 +0000
committerPierre-Yves Ritschard <pyr@cvs.openbsd.org>2007-05-31 18:24:03 +0000
commitab6ec948906680cbd8f108f04bf439e8d7d88db4 (patch)
tree5dab66ff58716c29ddfbb37c21259831dfd6dd97
parent14c12ff7be8f282899cf90685d09cc912f019e5f (diff)
simplify pfe_disable_events
-rw-r--r--usr.sbin/hoststated/pfe.c11
-rw-r--r--usr.sbin/relayd/pfe.c11
2 files changed, 8 insertions, 14 deletions
diff --git a/usr.sbin/hoststated/pfe.c b/usr.sbin/hoststated/pfe.c
index b237ad29179..67e34cb9707 100644
--- a/usr.sbin/hoststated/pfe.c
+++ b/usr.sbin/hoststated/pfe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pfe.c,v 1.28 2007/05/31 15:49:26 pyr Exp $ */
+/* $OpenBSD: pfe.c,v 1.29 2007/05/31 18:24:02 pyr Exp $ */
/*
* Copyright (c) 2006 Pierre-Yves Ritschard <pyr@spootnik.org>
@@ -197,15 +197,12 @@ pfe_setup_events(void)
void
pfe_disable_events(void)
{
- int i;
- struct imsgbuf *ibuf;
+ int i;
event_del(&ibuf_hce->ev);
- for (i = 0; i < env->prefork_relay; i++) {
- ibuf = &ibuf_relay[i];
- event_del(&ibuf->ev);
- }
+ for (i = 0; i < env->prefork_relay; i++)
+ event_del(&ibuf_relay[i].ev);
}
void
diff --git a/usr.sbin/relayd/pfe.c b/usr.sbin/relayd/pfe.c
index b237ad29179..67e34cb9707 100644
--- a/usr.sbin/relayd/pfe.c
+++ b/usr.sbin/relayd/pfe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pfe.c,v 1.28 2007/05/31 15:49:26 pyr Exp $ */
+/* $OpenBSD: pfe.c,v 1.29 2007/05/31 18:24:02 pyr Exp $ */
/*
* Copyright (c) 2006 Pierre-Yves Ritschard <pyr@spootnik.org>
@@ -197,15 +197,12 @@ pfe_setup_events(void)
void
pfe_disable_events(void)
{
- int i;
- struct imsgbuf *ibuf;
+ int i;
event_del(&ibuf_hce->ev);
- for (i = 0; i < env->prefork_relay; i++) {
- ibuf = &ibuf_relay[i];
- event_del(&ibuf->ev);
- }
+ for (i = 0; i < env->prefork_relay; i++)
+ event_del(&ibuf_relay[i].ev);
}
void