]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Simplify channel_next_with_digest() in channel.c
authorAndrea Shepard <andrea@torproject.org>
Tue, 9 Oct 2012 03:08:18 +0000 (20:08 -0700)
committerAndrea Shepard <andrea@torproject.org>
Tue, 9 Oct 2012 03:08:18 +0000 (20:08 -0700)
src/or/channel.c

index f987caed524c1d1d9310fa392c9b1a3f26fc7af0..2ca9a13238de8e7851206afa8dd1769ba03d2c20 100644 (file)
@@ -622,15 +622,10 @@ channel_find_by_remote_digest(const char *identity_digest)
 channel_t *
 channel_next_with_digest(channel_t *chan)
 {
-  channel_t *rv = NULL;
-
   tor_assert(chan);
   tor_assert(!(chan->is_listener));
 
-  if (chan->u.cell_chan.next_with_same_id)
-    rv = chan->u.cell_chan.next_with_same_id;
-
-  return rv;
+  return chan->u.cell_chan.next_with_same_id;
 }
 
 /**