[tor-commits] [tor/release-0.2.2] Remove a few dead assignments during router parsing
arma at torproject.org
arma at torproject.org
Mon Jun 20 01:04:13 UTC 2011
commit e6fff7235e46b794cd77af516a1ecfab9c87de7f
Author: Sebastian Hahn <sebastian at torproject.org>
Date: Wed Jun 8 21:16:11 2011 +0200
Remove a few dead assignments during router parsing
---
changes/coverity_maint | 1 +
src/or/routerparse.c | 6 +++---
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/changes/coverity_maint b/changes/coverity_maint
index 1bd1c41..fd8c440 100644
--- a/changes/coverity_maint
+++ b/changes/coverity_maint
@@ -1,5 +1,6 @@
o Code simplifications and refactoring:
- Remove some dead code as indicated by coverity.
+ - Remove a few dead assignments during router parsing. Found by coverity.
o Minor bugfixes:
- Add some forgotten return value checks during unit tests. Found
by coverity.
diff --git a/src/or/routerparse.c b/src/or/routerparse.c
index f855f9d..42dbcac 100644
--- a/src/or/routerparse.c
+++ b/src/or/routerparse.c
@@ -1544,10 +1544,10 @@ router_parse_entry_from_string(const char *s, const char *end,
}
}
- if ((tok = find_opt_by_keyword(tokens, K_CACHES_EXTRA_INFO)))
+ if (find_opt_by_keyword(tokens, K_CACHES_EXTRA_INFO))
router->caches_extra_info = 1;
- if ((tok = find_opt_by_keyword(tokens, K_ALLOW_SINGLE_HOP_EXITS)))
+ if (find_opt_by_keyword(tokens, K_ALLOW_SINGLE_HOP_EXITS))
router->allow_single_hop_exits = 1;
if ((tok = find_opt_by_keyword(tokens, K_EXTRA_INFO_DIGEST))) {
@@ -1560,7 +1560,7 @@ router_parse_entry_from_string(const char *s, const char *end,
}
}
- if ((tok = find_opt_by_keyword(tokens, K_HIDDEN_SERVICE_DIR))) {
+ if (find_opt_by_keyword(tokens, K_HIDDEN_SERVICE_DIR)) {
router->wants_to_be_hs_dir = 1;
}
More information about the tor-commits
mailing list