diff options
author | George Kadianakis <desnacked@riseup.net> | 2016-08-25 01:44:34 +0300 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2016-11-04 10:32:50 -0400 |
commit | d795ed5871010b8ad6d216f5f4381e4191cb147c (patch) | |
tree | 47dff1ca705a55c78e8725b5007e9de54f4717f9 /src/or | |
parent | a8efd087bdd937027713217d74e1cfd40fba4961 (diff) | |
download | tor-d795ed5871010b8ad6d216f5f4381e4191cb147c.tar.gz tor-d795ed5871010b8ad6d216f5f4381e4191cb147c.zip |
Make check-spaces happy :)
Signed-off-by: David Goulet <dgoulet@torproject.org>
Signed-off-by: George Kadianakis <desnacked@riseup.net>
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/directory.c | 8 | ||||
-rw-r--r-- | src/or/hs_cache.c | 5 | ||||
-rw-r--r-- | src/or/hs_cache.h | 1 | ||||
-rw-r--r-- | src/or/hs_common.c | 3 | ||||
-rw-r--r-- | src/or/hs_common.h | 1 | ||||
-rw-r--r-- | src/or/hs_descriptor.c | 24 | ||||
-rw-r--r-- | src/or/hs_descriptor.h | 1 | ||||
-rw-r--r-- | src/or/parsecommon.c | 5 | ||||
-rw-r--r-- | src/or/parsecommon.h | 2 | ||||
-rw-r--r-- | src/or/rendclient.c | 2 | ||||
-rw-r--r-- | src/or/rendcommon.c | 1 |
11 files changed, 29 insertions, 24 deletions
diff --git a/src/or/directory.c b/src/or/directory.c index 8afb241520..29022fab4f 100644 --- a/src/or/directory.c +++ b/src/or/directory.c @@ -2350,10 +2350,10 @@ connection_dir_client_reached_eof(dir_connection_t *conn) conn->identity_digest, \ reason) ) #define SEND_HS_DESC_FAILED_CONTENT() ( \ - control_event_hs_descriptor_content(rend_data_get_address(conn->rend_data), \ - conn->requested_resource, \ - conn->identity_digest, \ - NULL) ) + control_event_hs_descriptor_content(rend_data_get_address(conn->rend_data), \ + conn->requested_resource, \ + conn->identity_digest, \ + NULL) ) tor_assert(conn->rend_data); log_info(LD_REND,"Received rendezvous descriptor (size %d, status %d " "(%s))", diff --git a/src/or/hs_cache.c b/src/or/hs_cache.c index 9b68045e89..6d33201469 100644 --- a/src/or/hs_cache.c +++ b/src/or/hs_cache.c @@ -81,7 +81,7 @@ cache_dir_desc_new(const char *desc) dir_desc->created_ts = time(NULL); return dir_desc; -err: + err: cache_dir_desc_free(dir_desc); return NULL; } @@ -173,7 +173,7 @@ cache_lookup_v3_as_dir(const char *query, char **desc_out) return found; -err: + err: return -1; } @@ -365,3 +365,4 @@ hs_cache_init(void) tor_assert(!hs_cache_v3_dir); hs_cache_v3_dir = digest256map_new(); } + diff --git a/src/or/hs_cache.h b/src/or/hs_cache.h index f0573175d3..466c33db09 100644 --- a/src/or/hs_cache.h +++ b/src/or/hs_cache.h @@ -57,3 +57,4 @@ STATIC size_t cache_clean_v3_as_dir(time_t now, time_t global_cutoff); #endif /* HS_CACHE_PRIVATE */ #endif /* TOR_HS_CACHE_H */ + diff --git a/src/or/hs_common.c b/src/or/hs_common.c index 2166005e71..c78af531a7 100644 --- a/src/or/hs_common.c +++ b/src/or/hs_common.c @@ -127,7 +127,7 @@ compute_desc_id(rend_data_t *rend_data) tor_assert(0); } -end: + end: return ret; } @@ -262,3 +262,4 @@ rend_data_get_pk_digest(const rend_data_t *rend_data, size_t *len_out) tor_assert(0); } } + diff --git a/src/or/hs_common.h b/src/or/hs_common.h index 824e5405f2..1d3a15df5a 100644 --- a/src/or/hs_common.h +++ b/src/or/hs_common.h @@ -34,3 +34,4 @@ const uint8_t *rend_data_get_pk_digest(const rend_data_t *rend_data, size_t *len_out); #endif /* TOR_HS_COMMON_H */ + diff --git a/src/or/hs_descriptor.c b/src/or/hs_descriptor.c index 9714d52f8c..a87a8605ec 100644 --- a/src/or/hs_descriptor.c +++ b/src/or/hs_descriptor.c @@ -167,7 +167,7 @@ encode_cert(const tor_cert_t *cert, char **cert_str_out) /* Success! */ ret = 0; -err: + err: tor_free(ed_cert_b64); return ret; } @@ -821,7 +821,7 @@ desc_encode_v3(const hs_descriptor_t *desc, char **encoded_out) /* Success! */ ret = 0; -err: + err: SMARTLIST_FOREACH(lines, char *, l, tor_free(l)); smartlist_free(lines); return ret; @@ -1177,14 +1177,14 @@ desc_decrypt_data_v3(const hs_descriptor_t *desc, char **decrypted_out) *decrypted_out = (char *) decrypted; goto done; -err: + err: if (decrypted) { tor_free(decrypted); } *decrypted_out = NULL; result_len = 0; -done: + done: memwipe(secret_key, 0, sizeof(secret_key)); memwipe(secret_iv, 0, sizeof(secret_iv)); return result_len; @@ -1326,9 +1326,9 @@ decode_introduction_point(const hs_descriptor_t *desc, const char *start) return ip; } -/* Given a descriptor string at <b>data</b>, decode all possible introduction points - * that we can find. Add the introduction point object to desc_enc as we find - * them. Return 0 on success. +/* Given a descriptor string at <b>data</b>, decode all possible introduction + * points that we can find. Add the introduction point object to desc_enc as we + * find them. Return 0 on success. * * On error, a negative value is returned. It is possible that some intro * point object have been added to the desc_enc, they should be considered @@ -1455,7 +1455,7 @@ desc_sig_is_valid(const char *b64_sig, const ed25519_keypair_t *signing_kp, /* Valid signature! All is good. */ ret = 1; -err: + err: return ret; } @@ -1557,7 +1557,8 @@ desc_decode_plaintext_v3(smartlist_t *tokens, } return 0; -err: + + err: return -1; } @@ -1778,7 +1779,7 @@ hs_desc_decode_plaintext(const char *encoded, /* Success. Descriptor has been populated with the data. */ ret = 0; -err: + err: if (tokens) { SMARTLIST_FOREACH(tokens, directory_token_t *, t, token_clear(t)); smartlist_free(tokens); @@ -1885,7 +1886,7 @@ hs_desc_encode_descriptor(const hs_descriptor_t *desc, char **encoded_out) return 0; -err: + err: *encoded_out = NULL; return ret; } @@ -1930,3 +1931,4 @@ hs_desc_plaintext_obj_size(const hs_desc_plaintext_data_t *data) return (sizeof(*data) + sizeof(*data->signing_key_cert) + data->encrypted_blob_size); } + diff --git a/src/or/hs_descriptor.h b/src/or/hs_descriptor.h index 1213597984..b48079e219 100644 --- a/src/or/hs_descriptor.h +++ b/src/or/hs_descriptor.h @@ -235,3 +235,4 @@ STATIC int desc_sig_is_valid(const char *b64_sig, #endif /* HS_DESCRIPTOR_PRIVATE */ #endif /* TOR_HS_DESCRIPTOR_H */ + diff --git a/src/or/parsecommon.c b/src/or/parsecommon.c index 72e69e8ea3..6622d7d671 100644 --- a/src/or/parsecommon.c +++ b/src/or/parsecommon.c @@ -146,7 +146,6 @@ tokenize_string(memarea_t *area, return 0; } - /** Helper: parse space-separated arguments from the string <b>s</b> ending at * <b>eol</b>, and store them in the args field of <b>tok</b>. Store the * number of parsed elements into the n_args field of <b>tok</b>. Allocate @@ -243,8 +242,6 @@ token_check_object(memarea_t *area, const char *kwd, return tok; } - - /** Helper function: read the next token from *s, advance *s to the end of the * token, and return the parsed token. Parse *<b>s</b> according to the list * of tokens in <b>table</b>. @@ -408,7 +405,6 @@ get_next_token(memarea_t *area, #undef STRNDUP } - /** Find the first token in <b>s</b> whose keyword is <b>keyword</b>; fail * with an assert if no such keyword is found. */ @@ -451,3 +447,4 @@ find_all_by_keyword(smartlist_t *s, directory_keyword k) }); return out; } + diff --git a/src/or/parsecommon.h b/src/or/parsecommon.h index f87e62de98..be7cba47d1 100644 --- a/src/or/parsecommon.h +++ b/src/or/parsecommon.h @@ -6,7 +6,6 @@ * \brief Header file for parsecommon.c **/ - #ifndef TOR_PARSECOMMON_H #define TOR_PARSECOMMON_H @@ -304,3 +303,4 @@ directory_token_t *find_opt_by_keyword(smartlist_t *s, smartlist_t * find_all_by_keyword(smartlist_t *s, directory_keyword k); #endif /* TOR_PARSECOMMON_H */ + diff --git a/src/or/rendclient.c b/src/or/rendclient.c index ad47ca6242..0bfc1a1805 100644 --- a/src/or/rendclient.c +++ b/src/or/rendclient.c @@ -151,7 +151,7 @@ rend_client_send_introduction(origin_circuit_t *introcirc, tor_assert(introcirc->rend_data); tor_assert(rendcirc->rend_data); tor_assert(!rend_cmp_service_ids(rend_data_get_address(introcirc->rend_data), - rend_data_get_address(rendcirc->rend_data))); + rend_data_get_address(rendcirc->rend_data))); #ifndef NON_ANONYMOUS_MODE_ENABLED tor_assert(!(introcirc->build_state->onehop_tunnel)); tor_assert(!(rendcirc->build_state->onehop_tunnel)); diff --git a/src/or/rendcommon.c b/src/or/rendcommon.c index e6a7bbc28c..125aa0f5ef 100644 --- a/src/or/rendcommon.c +++ b/src/or/rendcommon.c @@ -978,3 +978,4 @@ rend_circuit_pk_digest_eq(const origin_circuit_t *ocirc, match: return 1; } + |