[tor-commits] [tor/master] Remove a dead variable in the heartbeat code
nickm at torproject.org
nickm at torproject.org
Thu Jun 9 00:29:32 UTC 2011
commit 3033f8459b332c934b3098ee15c3aa04e3545484
Author: Sebastian Hahn <sebastian at torproject.org>
Date: Wed Jun 8 21:10:43 2011 +0200
Remove a dead variable in the heartbeat code
---
changes/coverity_master | 2 ++
src/or/status.c | 3 +--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/changes/coverity_master b/changes/coverity_master
index 3b61087..ab174bc 100644
--- a/changes/coverity_master
+++ b/changes/coverity_master
@@ -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.
diff --git a/src/or/status.c b/src/or/status.c
index c8bc070..64e3022 100644
--- a/src/or/status.c
+++ b/src/or/status.c
@@ -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.");
}
More information about the tor-commits
mailing list