summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReyk Floeter <reyk@cvs.openbsd.org>2009-06-02 12:24:17 +0000
committerReyk Floeter <reyk@cvs.openbsd.org>2009-06-02 12:24:17 +0000
commit6a318e862a4a9ae95093da244047c8f5b6ec78af (patch)
treeb5c16e751051c5228f2c7ddb4ccdaf68c7a23aab
parented860fe1c7cf8fc0126e575e7a620e567cbe5cdb (diff)
remove extra imsg_event_add() after EV_WRITE checks - this is not
required because it is called later and there is no return before. ok gilles@
-rw-r--r--usr.sbin/relayd/hce.c6
-rw-r--r--usr.sbin/relayd/pfe.c8
-rw-r--r--usr.sbin/relayd/relay.c6
-rw-r--r--usr.sbin/relayd/relayd.c8
4 files changed, 4 insertions, 24 deletions
diff --git a/usr.sbin/relayd/hce.c b/usr.sbin/relayd/hce.c
index 748073189dd..f85b7eca36c 100644
--- a/usr.sbin/relayd/hce.c
+++ b/usr.sbin/relayd/hce.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hce.c,v 1.48 2009/06/02 11:33:06 reyk Exp $ */
+/* $OpenBSD: hce.c,v 1.49 2009/06/02 12:24:16 reyk Exp $ */
/*
* Copyright (c) 2006 Pierre-Yves Ritschard <pyr@openbsd.org>
@@ -382,8 +382,6 @@ hce_dispatch_imsg(int fd, short event, void *ptr)
if (event & EV_WRITE) {
if (msgbuf_write(&ibuf->w) == -1)
fatal("hce_dispatch_imsg: msgbuf_write");
- imsg_event_add(ibuf);
- return;
}
for (;;) {
@@ -470,8 +468,6 @@ hce_dispatch_parent(int fd, short event, void * ptr)
if (event & EV_WRITE) {
if (msgbuf_write(&ibuf->w) == -1)
fatal("hce_dispatch_parent: msgbuf_write");
- imsg_event_add(ibuf);
- return;
}
for (;;) {
diff --git a/usr.sbin/relayd/pfe.c b/usr.sbin/relayd/pfe.c
index c46471e265e..ba926dbb9f4 100644
--- a/usr.sbin/relayd/pfe.c
+++ b/usr.sbin/relayd/pfe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pfe.c,v 1.56 2009/06/02 11:33:06 reyk Exp $ */
+/* $OpenBSD: pfe.c,v 1.57 2009/06/02 12:24:16 reyk Exp $ */
/*
* Copyright (c) 2006 Pierre-Yves Ritschard <pyr@openbsd.org>
@@ -244,8 +244,6 @@ pfe_dispatch_imsg(int fd, short event, void *ptr)
if (event & EV_WRITE) {
if (msgbuf_write(&ibuf->w) == -1)
fatal("pfe_dispatch_imsg: msgbuf_write");
- imsg_event_add(ibuf);
- return;
}
for (;;) {
@@ -353,8 +351,6 @@ pfe_dispatch_parent(int fd, short event, void * ptr)
if (event & EV_WRITE) {
if (msgbuf_write(&ibuf->w) == -1)
fatal("msgbuf_write");
- imsg_event_add(ibuf);
- return;
}
for (;;) {
@@ -475,8 +471,6 @@ pfe_dispatch_relay(int fd, short event, void * ptr)
if (event & EV_WRITE) {
if (msgbuf_write(&ibuf->w) == -1)
fatal("msgbuf_write");
- imsg_event_add(ibuf);
- return;
}
for (;;) {
diff --git a/usr.sbin/relayd/relay.c b/usr.sbin/relayd/relay.c
index 3dab40350c4..f1e4a29e1f2 100644
--- a/usr.sbin/relayd/relay.c
+++ b/usr.sbin/relayd/relay.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: relay.c,v 1.111 2009/06/02 11:33:06 reyk Exp $ */
+/* $OpenBSD: relay.c,v 1.112 2009/06/02 12:24:16 reyk Exp $ */
/*
* Copyright (c) 2006, 2007, 2008 Reyk Floeter <reyk@openbsd.org>
@@ -2419,8 +2419,6 @@ relay_dispatch_pfe(int fd, short event, void *ptr)
if (event & EV_WRITE) {
if (msgbuf_write(&ibuf->w) == -1)
fatal("relay_dispatch_pfe: msgbuf_write");
- imsg_event_add(ibuf);
- return;
}
for (;;) {
@@ -2540,8 +2538,6 @@ relay_dispatch_parent(int fd, short event, void * ptr)
if (event & EV_WRITE) {
if (msgbuf_write(&ibuf->w) == -1)
fatal("relay_dispatch_parent: msgbuf_write");
- imsg_event_add(ibuf);
- return;
}
for (;;) {
diff --git a/usr.sbin/relayd/relayd.c b/usr.sbin/relayd/relayd.c
index e1daba0705e..c2056389d50 100644
--- a/usr.sbin/relayd/relayd.c
+++ b/usr.sbin/relayd/relayd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: relayd.c,v 1.84 2009/06/02 11:33:06 reyk Exp $ */
+/* $OpenBSD: relayd.c,v 1.85 2009/06/02 12:24:16 reyk Exp $ */
/*
* Copyright (c) 2007, 2008 Reyk Floeter <reyk@openbsd.org>
@@ -608,8 +608,6 @@ main_dispatch_pfe(int fd, short event, void *ptr)
if (event & EV_WRITE) {
if (msgbuf_write(&ibuf->w) == -1)
fatal("msgbuf_write");
- imsg_event_add(ibuf);
- return;
}
for (;;) {
@@ -669,8 +667,6 @@ main_dispatch_hce(int fd, short event, void * ptr)
if (event & EV_WRITE) {
if (msgbuf_write(&ibuf->w) == -1)
fatal("msgbuf_write");
- imsg_event_add(ibuf);
- return;
}
for (;;) {
@@ -729,8 +725,6 @@ main_dispatch_relay(int fd, short event, void * ptr)
if (event & EV_WRITE) {
if (msgbuf_write(&ibuf->w) == -1)
fatal("msgbuf_write");
- imsg_event_add(ibuf);
- return;
}
for (;;) {