]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Minor change to make code more readable.
authorPavel Machek <pavel@ucw.cz>
Thu, 23 Mar 2000 12:08:40 +0000 (12:08 +0000)
committerPavel Machek <pavel@ucw.cz>
Thu, 23 Mar 2000 12:08:40 +0000 (12:08 +0000)
proto/rip/rip.c

index 37076e657c3a6ca69fcee8db797d761c8405553d..233ded6782c9480cb7c4a43d0ad0898419307139 100644 (file)
@@ -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