]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Remove a dead variable in the heartbeat code
authorSebastian Hahn <sebastian@torproject.org>
Wed, 8 Jun 2011 19:10:43 +0000 (21:10 +0200)
committerSebastian Hahn <sebastian@torproject.org>
Wed, 8 Jun 2011 19:11:42 +0000 (21:11 +0200)
changes/coverity_master
src/or/status.c

index 3b61087e2723fc6227e507255fdfb4f4ac1ac792..ab174bcecc4a9b2f855ba596adaa8324757a152d 100644 (file)
@@ -1,4 +1,6 @@
   o Minor bugfixes:
     - Prevent using negative indices during unit test runs when read_all()
       fails. Spotted by coverity. Bugfix on 0.2.3.1.
+  o Code simplifications and refactoring:
+    - Remove a dead variable in the heartbeat log code. Spotted by coverity.
 
index c8bc0705d821e2cae8deaba03e3df288ae236452..64e30222a517d3127ab685358ebdf7b3d7b9e13d 100644 (file)
@@ -84,7 +84,6 @@ log_heartbeat(time_t now)
   char *bw_rcvd = NULL;
   char *uptime = NULL;
   const routerinfo_t *me;
-  const node_t *myself;
 
   or_options_t *options = get_options();
   (void)now;
@@ -94,7 +93,7 @@ log_heartbeat(time_t now)
     if (!(me = router_get_my_routerinfo()))
       return -1; /* Something stinks, we won't even attempt this. */
     else
-      if (!(myself = node_get_by_id(me->cache_info.identity_digest)))
+      if (!node_get_by_id(me->cache_info.identity_digest))
         log_fn(LOG_NOTICE, LD_HEARTBEAT, "Heartbeat: It seems like we are not "
                "in the cached consensus.");
   }