summaryrefslogtreecommitdiffstats
path: root/proto/rip
diff options
context:
space:
mode:
authorPavel Machek <pavel@ucw.cz>2000-03-23 13:08:40 +0100
committerPavel Machek <pavel@ucw.cz>2000-03-23 13:08:40 +0100
commit772f489932cf24d7a408835ac67f7b4f4d85a1eb (patch)
tree04b28b992df78d4d0c042931889b63af083eb9dd /proto/rip
parentff8ed6328595c77e8b0ed3ed4cea3fb4d9bb141d (diff)
downloadbird-772f489932cf24d7a408835ac67f7b4f4d85a1eb.tar
bird-772f489932cf24d7a408835ac67f7b4f4d85a1eb.zip
Minor change to make code more readable.
Diffstat (limited to 'proto/rip')
-rw-r--r--proto/rip/rip.c30
1 files changed, 14 insertions, 16 deletions
diff --git a/proto/rip/rip.c b/proto/rip/rip.c
index 37076e6..233ded6 100644
--- a/proto/rip/rip.c
+++ b/proto/rip/rip.c
@@ -116,15 +116,8 @@ rip_tx( sock *s )
DBG( "Sending to %I\n", s->daddr );
do {
- if (c->done) {
- im_done:
- DBG( "Looks like I'm" );
- c->rif->busy = NULL;
- rem_node(NODE c);
- mb_free(c);
- DBG( " done\n" );
- return;
- }
+ if (c->done)
+ goto done;
DBG( "Preparing packet to send: " );
@@ -159,14 +152,12 @@ rip_tx( sock *s )
if (!i) {
DBG( "not sending NULL update\n" );
c->done = 1;
- goto im_done;
- }
- else {
- if (ipa_nonzero(c->daddr))
- i = sk_send_to( s, packetlen, c->daddr, c->dport );
- else
- i = sk_send( s, packetlen );
+ goto done;
}
+ if (ipa_nonzero(c->daddr))
+ i = sk_send_to( s, packetlen, c->daddr, c->dport );
+ else
+ i = sk_send( s, packetlen );
DBG( "it wants more\n" );
@@ -176,6 +167,13 @@ rip_tx( sock *s )
DBG( "blocked\n" );
return;
+done:
+ DBG( "Looks like I'm" );
+ c->rif->busy = NULL;
+ rem_node(NODE c);
+ mb_free(c);
+ DBG( " done\n" );
+ return;
}
static void