diff options
author | Peter Palfrader <peter@palfrader.org> | 2008-08-14 18:01:20 +0000 |
---|---|---|
committer | Peter Palfrader <peter@palfrader.org> | 2008-08-14 18:01:20 +0000 |
commit | e8de3ff54d043407c490c538dc75f1566c478bff (patch) | |
tree | 3785c3c71db98c7a695a9f761d62ec84bc539204 /src | |
parent | fdba26f21329acd97f16aac91dcf3014f29de3f6 (diff) | |
download | tor-e8de3ff54d043407c490c538dc75f1566c478bff.tar.gz tor-e8de3ff54d043407c490c538dc75f1566c478bff.zip |
If we are lucky the whitespace nazis will not have noticed these things yet
svn:r16549
Diffstat (limited to 'src')
-rw-r--r-- | src/or/dirserv.c | 12 | ||||
-rw-r--r-- | src/or/policies.c | 1 | ||||
-rw-r--r-- | src/or/test.c | 22 |
3 files changed, 20 insertions, 15 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c index 2186bf4fdd..3cc2c3718c 100644 --- a/src/or/dirserv.c +++ b/src/or/dirserv.c @@ -1948,15 +1948,17 @@ routerstatus_format_entry(char *buf, size_t buf_len, id, dd); return -1; }; - if(memcmp(desc->cache_info.signed_descriptor_digest, - rs->descriptor_digest, - DIGEST_LEN)) { + if (memcmp(desc->cache_info.signed_descriptor_digest, + rs->descriptor_digest, + DIGEST_LEN)) { char rl_d[HEX_DIGEST_LEN+1]; char rs_d[HEX_DIGEST_LEN+1]; - base16_encode(rl_d, sizeof(rl_d), desc->cache_info.signed_descriptor_digest, DIGEST_LEN); + base16_encode(rl_d, sizeof(rl_d), + desc->cache_info.signed_descriptor_digest, DIGEST_LEN); base16_encode(rs_d, sizeof(rs_d), rs->descriptor_digest, DIGEST_LEN); - log_err(LD_BUG, "descriptor digest in routerlist does not match the one in routerstatus: %s vs %s\n", + log_err(LD_BUG, "descriptor digest in routerlist does not match " + "the one in routerstatus: %s vs %s\n", rl_d, rs_d); tor_assert(!memcmp(desc->cache_info.signed_descriptor_digest, diff --git a/src/or/policies.c b/src/or/policies.c index a5f8a28460..02c408fec2 100644 --- a/src/or/policies.c +++ b/src/or/policies.c @@ -47,7 +47,6 @@ typedef struct policy_summary_item_t { int accepted:1; /** Has this port already been accepted */ } policy_summary_item_t; - /** Private networks. This list is used in two places, once to expand the * "private" keyword when parsing our own exit policy, secondly to ignore * just such networks when building exit policy summaries. It is important diff --git a/src/or/test.c b/src/or/test.c index c74e23a519..bec7eec460 100644 --- a/src/or/test.c +++ b/src/or/test.c @@ -2863,18 +2863,22 @@ test_util_order_functions(void) } static routerinfo_t * -generate_ri_from_rs(const vote_routerstatus_t *vrs) { +generate_ri_from_rs(const vote_routerstatus_t *vrs) +{ routerinfo_t *r; const routerstatus_t *rs = &vrs->status; static time_t published = 0; r = tor_malloc_zero(sizeof(routerinfo_t)); memcpy(r->cache_info.identity_digest, rs->identity_digest, DIGEST_LEN); - memcpy(r->cache_info.signed_descriptor_digest, rs->descriptor_digest, DIGEST_LEN); + memcpy(r->cache_info.signed_descriptor_digest, rs->descriptor_digest, + DIGEST_LEN); r->cache_info.do_not_cache = 1; r->cache_info.routerlist_index = -1; - r->cache_info.signed_descriptor_body = tor_strdup("123456789012345678901234567890123"); - r->cache_info.signed_descriptor_len = strlen(r->cache_info.signed_descriptor_body); + r->cache_info.signed_descriptor_body = + tor_strdup("123456789012345678901234567890123"); + r->cache_info.signed_descriptor_len = + strlen(r->cache_info.signed_descriptor_body); r->exit_policy = smartlist_create(); r->cache_info.published_on = ++published + time(NULL); return r; @@ -2963,7 +2967,7 @@ test_v3_networkstatus(void) /* all flags but running cleared */ rs->is_running = 1; smartlist_add(vote->routerstatus_list, vrs); - test_assert(router_add_to_routerlist(generate_ri_from_rs(vrs), &msg, 0, 0) >= 0); + test_assert(router_add_to_routerlist(generate_ri_from_rs(vrs), &msg,0,0)>=0); /* add the second routerstatus. */ vrs = tor_malloc_zero(sizeof(vote_routerstatus_t)); @@ -2979,7 +2983,7 @@ test_v3_networkstatus(void) rs->is_exit = rs->is_stable = rs->is_fast = rs->is_running = rs->is_valid = rs->is_v2_dir = rs->is_possible_guard = 1; smartlist_add(vote->routerstatus_list, vrs); - test_assert(router_add_to_routerlist(generate_ri_from_rs(vrs), &msg, 0, 0) >= 0); + test_assert(router_add_to_routerlist(generate_ri_from_rs(vrs), &msg,0,0)>=0); /* add the third routerstatus. */ vrs = tor_malloc_zero(sizeof(vote_routerstatus_t)); @@ -2995,7 +2999,7 @@ test_v3_networkstatus(void) rs->is_authority = rs->is_exit = rs->is_stable = rs->is_fast = rs->is_running = rs->is_valid = rs->is_v2_dir = rs->is_possible_guard = 1; smartlist_add(vote->routerstatus_list, vrs); - test_assert(router_add_to_routerlist(generate_ri_from_rs(vrs), &msg, 0, 0) >= 0); + test_assert(router_add_to_routerlist(generate_ri_from_rs(vrs), &msg,0,0)>=0); /* add a fourth routerstatus that is not running. */ vrs = tor_malloc_zero(sizeof(vote_routerstatus_t)); @@ -3010,7 +3014,7 @@ test_v3_networkstatus(void) rs->dir_port = 1999; /* Running flag (and others) cleared */ smartlist_add(vote->routerstatus_list, vrs); - test_assert(router_add_to_routerlist(generate_ri_from_rs(vrs), &msg, 0, 0) >= 0); + test_assert(router_add_to_routerlist(generate_ri_from_rs(vrs), &msg,0,0)>=0); /* dump the vote and try to parse it. */ v1_text = format_networkstatus_vote(sign_skey_1, vote); @@ -3134,7 +3138,7 @@ test_v3_networkstatus(void) tor_free(vrs); vrs = smartlist_get(vote->routerstatus_list, 0); memset(vrs->status.descriptor_digest, (int)'Z', DIGEST_LEN); - test_assert(router_add_to_routerlist(generate_ri_from_rs(vrs), &msg, 0, 0) >= 0); + test_assert(router_add_to_routerlist(generate_ri_from_rs(vrs), &msg,0,0)>=0); v3_text = format_networkstatus_vote(sign_skey_3, vote); test_assert(v3_text); |