r13275@catbus: nickm | 2007-06-05 19:11:05 -0400

Apply my sekrit "unused macro detector" script to hunt down some macros we didnt use.


svn:r10510
This commit is contained in:
Nick Mathewson 2007-06-06 04:51:30 +00:00
parent 1866ad3506
commit d3b140b0de
3 changed files with 4 additions and 22 deletions

View File

@ -250,14 +250,6 @@ typedef enum {
/** State for any listener connection. */
#define LISTENER_STATE_READY 0
#define _DNSWORKER_STATE_MIN 1
/** State for a connection to a dnsworker process that's idle. */
#define DNSWORKER_STATE_IDLE 1
/** State for a connection to a dnsworker process that's resolving a
* hostname. */
#define DNSWORKER_STATE_BUSY 2
#define _DNSWORKER_STATE_MAX 2
#define _CPUWORKER_STATE_MIN 1
/** State for a connection to a cpuworker process that's idle. */
#define CPUWORKER_STATE_IDLE 1

View File

@ -179,10 +179,10 @@ typedef struct token_rule_t {
static token_rule_t routerdesc_token_table[] = {
T0N("reject", K_REJECT, ARGS, NO_OBJ ),
T0N("accept", K_ACCEPT, ARGS, NO_OBJ ),
T1( "router", K_ROUTER, GE(5), NO_OBJ ),
T1_START( "router", K_ROUTER, GE(5), NO_OBJ ),
T1( "signing-key", K_SIGNING_KEY, NO_ARGS, NEED_KEY_1024 ),
T1( "onion-key", K_ONION_KEY, NO_ARGS, NEED_KEY_1024 ),
T1( "router-signature", K_ROUTER_SIGNATURE, NO_ARGS, NEED_OBJ ),
T1_END( "router-signature", K_ROUTER_SIGNATURE, NO_ARGS, NEED_OBJ ),
T1( "published", K_PUBLISHED, CONCAT_ARGS, NO_OBJ ),
T01("uptime", K_UPTIME, GE(1), NO_OBJ ),
T01("fingerprint", K_FINGERPRINT, CONCAT_ARGS, NO_OBJ ),
@ -205,12 +205,12 @@ static token_rule_t routerdesc_token_table[] = {
/** List of tokens allowable in extra-info documents. */
static token_rule_t extrainfo_token_table[] = {
T1( "router-signature", K_ROUTER_SIGNATURE, NO_ARGS, NEED_OBJ ),
T1_END( "router-signature", K_ROUTER_SIGNATURE, NO_ARGS, NEED_OBJ ),
T1( "published", K_PUBLISHED, CONCAT_ARGS, NO_OBJ ),
T0N("opt", K_OPT, CONCAT_ARGS, OBJ_OK ),
T01("read-history", K_READ_HISTORY, ARGS, NO_OBJ ),
T01("write-history", K_WRITE_HISTORY, ARGS, NO_OBJ ),
T1( "extra-info", K_EXTRA_INFO, GE(2), NO_OBJ ),
T1_START( "extra-info", K_EXTRA_INFO, GE(2), NO_OBJ ),
END_OF_TABLE
};

View File

@ -1024,16 +1024,6 @@ _test_eq_ip6(struct in6_addr *a, struct in6_addr *b, const char *e1,
test_eq_ip6(&a1, &a2); \
} while (0)
#define test_ntop6_reduces2(a,b,c) do { \
r = tor_inet_pton(AF_INET6, a, &a1); \
test_assert(r==1); \
test_assert(tor_inet_ntop(AF_INET6, &a1, buf, sizeof(buf))); \
test_assert(!strcmp(buf, b) || !strcmp(buf, c)); \
r = tor_inet_pton(AF_INET6, b, &a2); \
test_assert(r==1); \
test_eq_ip6(&a1, &a2); \
} while (0)
static void
test_ip6_helpers(void)
{