summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2008-12-17 17:20:42 +0000
committerNick Mathewson <nickm@torproject.org>2008-12-17 17:20:42 +0000
commitf43bcdc063b486516187715bb0205e3c154497db (patch)
tree8157de32e728e85a663bd0e46ed06920c6488b38
parentfc5e686b197b350b0e5eab7e7f355a226125d834 (diff)
downloadtor-f43bcdc063b486516187715bb0205e3c154497db.tar.gz
tor-f43bcdc063b486516187715bb0205e3c154497db.zip
Use ctags and a python script to find identifiers that are never used anywhere, and remove the ones that we really want gone.
svn:r17651
-rw-r--r--src/common/crypto.c2
-rw-r--r--src/or/buffers.c4
-rw-r--r--src/or/command.c2
-rw-r--r--src/or/connection_edge.c4
-rw-r--r--src/or/dirserv.c1
-rw-r--r--src/or/or.h6
-rw-r--r--src/or/routerparse.c3
7 files changed, 5 insertions, 17 deletions
diff --git a/src/common/crypto.c b/src/common/crypto.c
index e1b4012138..f7874844d6 100644
--- a/src/common/crypto.c
+++ b/src/common/crypto.c
@@ -2073,7 +2073,7 @@ base64_decode(char *dest, size_t destlen, const char *src, size_t srclen)
}
#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
diff --git a/src/or/buffers.c b/src/or/buffers.c
index cb36a523e2..ecbbdc1f03 100644
--- a/src/or/buffers.c
+++ b/src/or/buffers.c
@@ -219,10 +219,6 @@ chunk_new_with_alloc_size(size_t alloc)
}
#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 *
diff --git a/src/or/command.c b/src/or/command.c
index 476501ffcf..30025acbf4 100644
--- a/src/or/command.c
+++ b/src/or/command.c
@@ -28,8 +28,6 @@ uint64_t stats_n_relay_cells_processed = 0;
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);
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c
index 8e16b8ed84..0775e39645 100644
--- a/src/or/connection_edge.c
+++ b/src/or/connection_edge.c
@@ -2923,8 +2923,8 @@ connection_ap_can_use_exit(edge_connection_t *conn, routerinfo_t *exit)
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)
{
diff --git a/src/or/dirserv.c b/src/or/dirserv.c
index 8540d818f8..c5b3b79da3 100644
--- a/src/or/dirserv.c
+++ b/src/or/dirserv.c
@@ -1606,6 +1606,7 @@ should_generate_v2_networkstatus(void)
#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. */
diff --git a/src/or/or.h b/src/or/or.h
index fafdad433f..3a777ed81e 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -1539,9 +1539,6 @@ typedef struct networkstatus_v2_t {
/** 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 @@ typedef struct {
* 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 @@ typedef struct {
* 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
diff --git a/src/or/routerparse.c b/src/or/routerparse.c
index d340c71f5b..1d11571db2 100644
--- a/src/or/routerparse.c
+++ b/src/or/routerparse.c
@@ -108,7 +108,6 @@ typedef enum {
C_DESCRIPTOR_COOKIE,
C_CLIENT_KEY,
- _UNRECOGNIZED,
_ERR,
_EOF,
_NIL
@@ -208,7 +207,7 @@ typedef struct token_rule_t {
/** 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