[or-cvs] r17651: {tor} Use ctags and a python script to find identifiers that are n (in tor/trunk/src: common or)

nickm at seul.org nickm at seul.org
Wed Dec 17 17:20:44 UTC 2008


Author: nickm
Date: 2008-12-17 12:20:42 -0500 (Wed, 17 Dec 2008)
New Revision: 17651

Modified:
   tor/trunk/src/common/crypto.c
   tor/trunk/src/or/buffers.c
   tor/trunk/src/or/command.c
   tor/trunk/src/or/connection_edge.c
   tor/trunk/src/or/dirserv.c
   tor/trunk/src/or/or.h
   tor/trunk/src/or/routerparse.c
Log:
Use ctags and a python script to find identifiers that are never used anywhere, and remove the ones that we really want gone.

Modified: tor/trunk/src/common/crypto.c
===================================================================
--- tor/trunk/src/common/crypto.c	2008-12-17 17:20:36 UTC (rev 17650)
+++ tor/trunk/src/common/crypto.c	2008-12-17 17:20:42 UTC (rev 17651)
@@ -2073,7 +2073,7 @@
 }
 #undef X
 #undef SP
-#undef NIL
+#undef PAD
 
 /** Base-64 encode DIGEST_LINE bytes from <b>digest</b>, remove the trailing =
  * and newline characters, and store the nul-terminated result in the first

Modified: tor/trunk/src/or/buffers.c
===================================================================
--- tor/trunk/src/or/buffers.c	2008-12-17 17:20:36 UTC (rev 17650)
+++ tor/trunk/src/or/buffers.c	2008-12-17 17:20:42 UTC (rev 17651)
@@ -219,10 +219,6 @@
 }
 #endif
 
-/** Allocate a new chunk with memory size of <b>sz</b>. */
-#define chunk_new_with_capacity(sz) \
-  (chunk_new_with_alloc_size(CHUNK_ALLOC_SIZE(sz)))
-
 /** Expand <b>chunk</b> until it can hold <b>sz</b> bytes, and return a
  * new pointer to <b>chunk</b>.  Old pointers are no longer valid. */
 static INLINE chunk_t *

Modified: tor/trunk/src/or/command.c
===================================================================
--- tor/trunk/src/or/command.c	2008-12-17 17:20:36 UTC (rev 17650)
+++ tor/trunk/src/or/command.c	2008-12-17 17:20:42 UTC (rev 17651)
@@ -28,8 +28,6 @@
 uint64_t stats_n_destroy_cells_processed = 0;
 uint64_t stats_n_versions_cells_processed = 0;
 uint64_t stats_n_netinfo_cells_processed = 0;
-uint64_t stats_n_cert_cells_processed = 0;
-uint64_t stats_n_link_auth_cells_processed = 0;
 
 /* These are the main functions for processing cells */
 static void command_process_create_cell(cell_t *cell, or_connection_t *conn);

Modified: tor/trunk/src/or/connection_edge.c
===================================================================
--- tor/trunk/src/or/connection_edge.c	2008-12-17 17:20:36 UTC (rev 17650)
+++ tor/trunk/src/or/connection_edge.c	2008-12-17 17:20:42 UTC (rev 17651)
@@ -2923,8 +2923,8 @@
   return 1;
 }
 
-/** Make connection redirection follow the provided list of
- * exit_redirect_t */
+/** Make connection redirection follow the provided list of exit_redirect_t.
+ * Steals a reference to <b>lst</b>; caller MUST NOT free <b>list</b>. */
 void
 set_exit_redirects(smartlist_t *lst)
 {

Modified: tor/trunk/src/or/dirserv.c
===================================================================
--- tor/trunk/src/or/dirserv.c	2008-12-17 17:20:36 UTC (rev 17650)
+++ tor/trunk/src/or/dirserv.c	2008-12-17 17:20:42 UTC (rev 17651)
@@ -1606,6 +1606,7 @@
 #define UPTIME_TO_GUARANTEE_STABLE (3600*24*30)
 /** If a router's MTBF is at least this value, then it is always stable.
  * See above.  (Corresponds to about 7 days for current decay rates.) */
+/*XXXX021 Never actually used! */
 #define MTBF_TO_GUARANTEE_STABLE (60*60*24*5)
 /** Similarly, we protect sufficiently fast nodes from being pushed
  * out of the set of Fast nodes. */

Modified: tor/trunk/src/or/or.h
===================================================================
--- tor/trunk/src/or/or.h	2008-12-17 17:20:36 UTC (rev 17650)
+++ tor/trunk/src/or/or.h	2008-12-17 17:20:42 UTC (rev 17651)
@@ -1539,9 +1539,6 @@
   /** What was the digest of the document? */
   char networkstatus_digest[DIGEST_LEN];
 
-  unsigned int is_recent; /**< Is this recent enough to influence running
-                           * status? */
-
   /* These fields come from the actual network-status document.*/
   time_t published_on; /**< Declared publication date. */
 
@@ -2382,7 +2379,6 @@
                                        * node families */
   config_line_t *RedirectExit; /**< List of config lines for simple
                                        * addr/port redirection */
-  smartlist_t *RedirectExitList; /**< List of exit_redirect_t */
   config_line_t *AuthDirBadDir; /**< Address policy for descriptors to
                                  * mark as bad dir mirrors. */
   config_line_t *AuthDirBadExit; /**< Address policy for descriptors to
@@ -2448,8 +2444,6 @@
    * means directly from the authorities) no matter our other config? */
   int FetchDirInfoEarly;
 
-  smartlist_t *reachable_addr_policy; /**< Parsed from ReachableAddresses */
-
   char *VirtualAddrNetwork; /**< Address and mask to hand out for virtual
                              * MAPADDRESS requests. */
   int ServerDNSSearchDomains; /**< Boolean: If set, we don't force exit

Modified: tor/trunk/src/or/routerparse.c
===================================================================
--- tor/trunk/src/or/routerparse.c	2008-12-17 17:20:36 UTC (rev 17650)
+++ tor/trunk/src/or/routerparse.c	2008-12-17 17:20:42 UTC (rev 17651)
@@ -108,7 +108,6 @@
   C_DESCRIPTOR_COOKIE,
   C_CLIENT_KEY,
 
-  _UNRECOGNIZED,
   _ERR,
   _EOF,
   _NIL
@@ -208,7 +207,7 @@
 /** An item that must appear no more than once */
 #define T01(s,t,a,o)  { s, t, a, o, 0, 1, 0, 0 }
 /** An annotation that must appear no more than once */
-#define A01(s,t,a,o)  { s, t, a, o, 0, 1, 0, 0 }
+#define A01(s,t,a,o)  { s, t, a, o, 0, 1, 0, 1 }
 
 /* Argument multiplicity: any number of arguments. */
 #define ARGS        0,INT_MAX,0



More information about the tor-commits mailing list