diff options
author | Nick Mathewson <nickm@torproject.org> | 2006-10-09 02:35:51 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2006-10-09 02:35:51 +0000 |
commit | c6f2d725d005f912830b523aa1d1a419f4e22ecd (patch) | |
tree | 1368757b759b80251b8a1afd343f3a5ecab0a36d /src/or/router.c | |
parent | c34125503493b2a71728c1cc5e913744f797704e (diff) | |
download | tor-c6f2d725d005f912830b523aa1d1a419f4e22ecd.tar.gz tor-c6f2d725d005f912830b523aa1d1a419f4e22ecd.zip |
r8957@totoro: nickm | 2006-10-08 22:35:17 -0400
The otherwise regrettable MIPSpro C compiler warns about values set but never used, and about mixing enums and ints; these are good warnings, and so should be fixed. This removes some dead code and some potential bugs. Thanks to pnx.
svn:r8664
Diffstat (limited to 'src/or/router.c')
-rw-r--r-- | src/or/router.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/or/router.c b/src/or/router.c index a5d8895e7b..5f192cb53a 100644 --- a/src/or/router.c +++ b/src/or/router.c @@ -243,7 +243,6 @@ init_keys(void) char fingerprint[FINGERPRINT_LEN+1]; /*nickname<space>fp\n\0 */ char fingerprint_line[MAX_NICKNAME_LEN+FINGERPRINT_LEN+3]; - char *cp; const char *mydesc, *datadir; crypto_pk_env_t *prkey; char digest[20]; @@ -279,7 +278,6 @@ init_keys(void) if (check_private_dir(keydir, CPD_CREATE)) { return -1; } - cp = keydir + strlen(keydir); /* End of string. */ /* 1. Read identity key. Make it if none is found. */ tor_snprintf(keydir,sizeof(keydir),"%s/keys/identity.key",datadir); @@ -1093,7 +1091,7 @@ router_dump_router_to_string(char *s, size_t maxlen, routerinfo_t *router, char *bandwidth_usage; char *family_line; #ifdef DEBUG_ROUTER_DUMP_ROUTER_TO_STRING - char *s_tmp, *s_dup; + char *s_dup; const char *cp; routerinfo_t *ri_tmp; #endif @@ -1263,7 +1261,7 @@ router_dump_router_to_string(char *s, size_t maxlen, routerinfo_t *router, s[written+1] = 0; #ifdef DEBUG_ROUTER_DUMP_ROUTER_TO_STRING - cp = s_tmp = s_dup = tor_strdup(s); + cp = s_dup = tor_strdup(s); ri_tmp = router_parse_entry_from_string(cp, NULL, 1); if (!ri_tmp) { log_err(LD_BUG, |