]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Remove a needless check in channel_tls_handle_incoming
authorNick Mathewson <nickm@torproject.org>
Fri, 7 Feb 2014 17:01:16 +0000 (12:01 -0500)
committerNick Mathewson <nickm@torproject.org>
Fri, 7 Feb 2014 17:01:16 +0000 (12:01 -0500)
This patch removes an "if (chan)" that occurred at a place where
chan was definitely non-NULL.  Having it there made some static
analysis tools conclude that we were up to shenanigans.

This resolves #9979.

src/or/channeltls.c

index e76bae3da29cdc319a268bc4c4da839400f74f38..42d6874d8da2b1bc52de362624843a464e00d446 100644 (file)
@@ -287,8 +287,8 @@ channel_tls_handle_incoming(or_connection_t *orconn)
   if (is_local_addr(&(TO_CONN(orconn)->addr))) channel_mark_local(chan);
   channel_mark_incoming(chan);
 
-  /* If we got one, we should register it */
-  if (chan) channel_register(chan);
+  /* Register it */
+  channel_register(chan);
 
   return chan;
 }