]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Remove a few dead assignments during router parsing
authorSebastian Hahn <sebastian@torproject.org>
Wed, 8 Jun 2011 19:16:11 +0000 (21:16 +0200)
committerSebastian Hahn <sebastian@torproject.org>
Wed, 8 Jun 2011 19:30:40 +0000 (21:30 +0200)
changes/coverity_maint
src/or/routerparse.c

index 1bd1c417fb61ec60aaf4c4d833821fbdfd5f6e23..fd8c44050582ae6f04aeed29f4aca4067a86044f 100644 (file)
@@ -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.
index f855f9d0274456a9f2ef56c4d2b7d2bca794a6e6..42dbcacb5158a39529dd45dc7bc05e4f6b3c1873 100644 (file)
@@ -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;
   }