[or-cvs] r10510: Apply my sekrit "unused macro detector" script to hunt down (in tor/trunk: . src/or)
nickm at seul.org
nickm at seul.org
Wed Jun 6 04:51:30 UTC 2007
Author: nickm
Date: 2007-06-06 00:51:30 -0400 (Wed, 06 Jun 2007)
New Revision: 10510
Modified:
tor/trunk/
tor/trunk/src/or/or.h
tor/trunk/src/or/routerparse.c
tor/trunk/src/or/test.c
Log:
r13275 at catbus: nickm | 2007-06-05 19:11:05 -0400
Apply my sekrit "unused macro detector" script to hunt down some macros we didnt use.
Property changes on: tor/trunk
___________________________________________________________________
svk:merge ticket from /tor/trunk [r13275] on 8246c3cf-6607-4228-993b-4d95d33730f1
Modified: tor/trunk/src/or/or.h
===================================================================
--- tor/trunk/src/or/or.h 2007-06-06 04:51:25 UTC (rev 10509)
+++ tor/trunk/src/or/or.h 2007-06-06 04:51:30 UTC (rev 10510)
@@ -250,14 +250,6 @@
/** 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
Modified: tor/trunk/src/or/routerparse.c
===================================================================
--- tor/trunk/src/or/routerparse.c 2007-06-06 04:51:25 UTC (rev 10509)
+++ tor/trunk/src/or/routerparse.c 2007-06-06 04:51:30 UTC (rev 10510)
@@ -179,10 +179,10 @@
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 @@
/** 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
};
Modified: tor/trunk/src/or/test.c
===================================================================
--- tor/trunk/src/or/test.c 2007-06-06 04:51:25 UTC (rev 10509)
+++ tor/trunk/src/or/test.c 2007-06-06 04:51:30 UTC (rev 10510)
@@ -1024,16 +1024,6 @@
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)
{
More information about the tor-commits
mailing list