commit 17dcce3fe11bfea9c7c46d2b9fd5baeb63ebe1e2 Author: Nick Mathewson nickm@torproject.org Date: Thu Dec 7 10:52:55 2017 -0500
Fix wide lines introduced by previous patch. --- src/common/compat_libevent.h | 3 ++- src/common/crypto.h | 9 ++++++--- src/common/crypto_ed25519.h | 3 ++- src/common/storagedir.h | 3 ++- src/common/tortls.h | 3 ++- src/or/channel.h | 3 ++- src/or/circuitbuild.h | 3 ++- src/or/circuitmux.h | 3 ++- src/or/config.h | 3 ++- src/or/connection.h | 3 ++- src/or/conscache.h | 6 ++++-- src/or/dircollate.h | 3 ++- src/or/directory.h | 3 ++- src/or/dirserv.h | 3 ++- src/or/entrynodes.h | 8 +++++--- src/or/hs_common.h | 3 ++- src/or/hs_descriptor.h | 6 ++++-- src/or/hs_ident.h | 9 ++++++--- src/or/networkstatus.h | 9 ++++++--- src/or/onion.h | 3 ++- src/or/policies.h | 6 ++++-- src/or/proto_socks.h | 3 ++- src/or/protover.h | 3 ++- src/or/relay.h | 6 ++++-- src/or/rendcache.h | 3 ++- src/or/rendcommon.h | 9 ++++++--- src/or/rendservice.h | 9 ++++++--- src/or/replaycache.h | 3 ++- src/or/routerlist.h | 6 ++++-- 29 files changed, 91 insertions(+), 46 deletions(-)
diff --git a/src/common/compat_libevent.h b/src/common/compat_libevent.h index 086899ad1..0cdb73fbb 100644 --- a/src/common/compat_libevent.h +++ b/src/common/compat_libevent.h @@ -30,7 +30,8 @@ periodic_timer_t *periodic_timer_new(struct event_base *base, void (*cb)(periodic_timer_t *timer, void *data), void *data); void periodic_timer_free_(periodic_timer_t *); -#define periodic_timer_free(t) FREE_AND_NULL(periodic_timer_t, periodic_timer_free_, (t)) +#define periodic_timer_free(t) \ + FREE_AND_NULL(periodic_timer_t, periodic_timer_free_, (t))
#define tor_event_base_loopexit event_base_loopexit #define tor_event_base_loopbreak event_base_loopbreak diff --git a/src/common/crypto.h b/src/common/crypto.h index 30023bad9..eca115fa7 100644 --- a/src/common/crypto.h +++ b/src/common/crypto.h @@ -158,7 +158,8 @@ crypto_cipher_t *crypto_cipher_new_with_iv_and_bits(const uint8_t *key, const uint8_t *iv, int bits); void crypto_cipher_free_(crypto_cipher_t *env); -#define crypto_cipher_free(c) FREE_AND_NULL(crypto_cipher_t, crypto_cipher_free_, (c)) +#define crypto_cipher_free(c) \ + FREE_AND_NULL(crypto_cipher_t, crypto_cipher_free_, (c))
/* public key crypto */ MOCK_DECL(int, crypto_pk_generate_key_with_bits,(crypto_pk_t *env, int bits)); @@ -262,7 +263,8 @@ crypto_digest_t *crypto_digest_new(void); crypto_digest_t *crypto_digest256_new(digest_algorithm_t algorithm); crypto_digest_t *crypto_digest512_new(digest_algorithm_t algorithm); void crypto_digest_free_(crypto_digest_t *digest); -#define crypto_digest_free(d) FREE_AND_NULL(crypto_digest_t, crypto_digest_free_, (d)) +#define crypto_digest_free(d) \ + FREE_AND_NULL(crypto_digest_t, crypto_digest_free_, (d)) void crypto_digest_add_bytes(crypto_digest_t *digest, const char *data, size_t len); void crypto_digest_get_digest(crypto_digest_t *digest, @@ -281,7 +283,8 @@ crypto_xof_t *crypto_xof_new(void); void crypto_xof_add_bytes(crypto_xof_t *xof, const uint8_t *data, size_t len); void crypto_xof_squeeze_bytes(crypto_xof_t *xof, uint8_t *out, size_t len); void crypto_xof_free_(crypto_xof_t *xof); -#define crypto_xof_free(xof) FREE_AND_NULL(crypto_xof_t, crypto_xof_free_, (xof)) +#define crypto_xof_free(xof) \ + FREE_AND_NULL(crypto_xof_t, crypto_xof_free_, (xof))
/* Key negotiation */ #define DH_TYPE_CIRCUIT 1 diff --git a/src/common/crypto_ed25519.h b/src/common/crypto_ed25519.h index c05f5dfa9..74269ccff 100644 --- a/src/common/crypto_ed25519.h +++ b/src/common/crypto_ed25519.h @@ -119,7 +119,8 @@ int ed25519_pubkey_read_from_file(ed25519_public_key_t *pubkey_out, const char *filename);
void ed25519_keypair_free_(ed25519_keypair_t *kp); -#define ed25519_keypair_free(kp) FREE_AND_NULL(ed25519_keypair_t, ed25519_keypair_free_, (kp)) +#define ed25519_keypair_free(kp) \ + FREE_AND_NULL(ed25519_keypair_t, ed25519_keypair_free_, (kp))
int ed25519_pubkey_eq(const ed25519_public_key_t *key1, const ed25519_public_key_t *key2); diff --git a/src/common/storagedir.h b/src/common/storagedir.h index 0ddb65542..d99bd7ec5 100644 --- a/src/common/storagedir.h +++ b/src/common/storagedir.h @@ -10,7 +10,8 @@ struct sandbox_cfg_elem;
storage_dir_t * storage_dir_new(const char *dirname, int n_files); void storage_dir_free_(storage_dir_t *d); -#define storage_dir_free(d) FREE_AND_NULL(storage_dir_t, storage_dir_free_, (d)) +#define storage_dir_free(d) \ + FREE_AND_NULL(storage_dir_t, storage_dir_free_, (d))
int storage_dir_register_with_sandbox(storage_dir_t *d, struct sandbox_cfg_elem **cfg); diff --git a/src/common/tortls.h b/src/common/tortls.h index df8597db0..1dbf0b332 100644 --- a/src/common/tortls.h +++ b/src/common/tortls.h @@ -265,7 +265,8 @@ void tor_tls_log_one_error(tor_tls_t *tls, unsigned long err, int severity, int domain, const char *doing);
void tor_x509_cert_free_(tor_x509_cert_t *cert); -#define tor_x509_cert_free(c) FREE_AND_NULL(tor_x509_cert_t, tor_x509_cert_free_, (c)) +#define tor_x509_cert_free(c) \ + FREE_AND_NULL(tor_x509_cert_t, tor_x509_cert_free_, (c)) tor_x509_cert_t *tor_x509_cert_decode(const uint8_t *certificate, size_t certificate_len); void tor_x509_cert_get_der(const tor_x509_cert_t *cert, diff --git a/src/or/channel.h b/src/or/channel.h index 1ff226d37..9c631c15a 100644 --- a/src/or/channel.h +++ b/src/or/channel.h @@ -519,7 +519,8 @@ void channel_listener_closed(channel_listener_t *chan_l); void channel_free_(channel_t *chan); #define channel_free(chan) FREE_AND_NULL(channel_t, channel_free_, (chan)) void channel_listener_free_(channel_listener_t *chan_l); -#define channel_listener_free(chan_l) FREE_AND_NULL(channel_listener_t, channel_listener_free_, (chan_l)) +#define channel_listener_free(chan_l) \ + FREE_AND_NULL(channel_listener_t, channel_listener_free_, (chan_l))
/* State/metadata setters */
diff --git a/src/or/circuitbuild.h b/src/or/circuitbuild.h index 68c6d9ea7..9b5fcc71e 100644 --- a/src/or/circuitbuild.h +++ b/src/or/circuitbuild.h @@ -59,7 +59,8 @@ extend_info_t *extend_info_new(const char *nickname, extend_info_t *extend_info_from_node(const node_t *r, int for_direct_connect); extend_info_t *extend_info_dup(extend_info_t *info); void extend_info_free_(extend_info_t *info); -#define extend_info_free(info) FREE_AND_NULL(extend_info_t, extend_info_free_, (info)) +#define extend_info_free(info) \ + FREE_AND_NULL(extend_info_t, extend_info_free_, (info)) int extend_info_addr_is_allowed(const tor_addr_t *addr); int extend_info_supports_tap(const extend_info_t* ei); int extend_info_supports_ntor(const extend_info_t* ei); diff --git a/src/or/circuitmux.h b/src/or/circuitmux.h index 689decee8..255822946 100644 --- a/src/or/circuitmux.h +++ b/src/or/circuitmux.h @@ -105,7 +105,8 @@ circuitmux_t * circuitmux_alloc(void); void circuitmux_detach_all_circuits(circuitmux_t *cmux, smartlist_t *detached_out); void circuitmux_free_(circuitmux_t *cmux); -#define circuitmux_free(cmux) FREE_AND_NULL(circuitmux_t, circuitmux_free_, (cmux)) +#define circuitmux_free(cmux) \ + FREE_AND_NULL(circuitmux_t, circuitmux_free_, (cmux))
/* Policy control */ void circuitmux_clear_policy(circuitmux_t *cmux); diff --git a/src/or/config.h b/src/or/config.h index c591a8e54..8c9796b4c 100644 --- a/src/or/config.h +++ b/src/or/config.h @@ -153,7 +153,8 @@ typedef struct bridge_line_t { } bridge_line_t;
void bridge_line_free_(bridge_line_t *bridge_line); -#define bridge_line_free(line) FREE_AND_NULL(bridge_line_t, bridge_line_free_, (line)) +#define bridge_line_free(line) \ + FREE_AND_NULL(bridge_line_t, bridge_line_free_, (line)) bridge_line_t *parse_bridge_line(const char *line); smartlist_t *get_options_from_transport_options_line(const char *line, const char *transport); diff --git a/src/or/connection.h b/src/or/connection.h index 9ba1606d6..6bc5a7cfd 100644 --- a/src/or/connection.h +++ b/src/or/connection.h @@ -30,7 +30,8 @@ int connection_init_accepted_conn(connection_t *conn, const listener_connection_t *listener); void connection_link_connections(connection_t *conn_a, connection_t *conn_b); MOCK_DECL(void,connection_free_,(connection_t *conn)); -#define connection_free(conn) FREE_AND_NULL(connection_t, connection_free_, (conn)) +#define connection_free(conn) \ + FREE_AND_NULL(connection_t, connection_free_, (conn)) void connection_free_all(void); void connection_about_to_close_connection(connection_t *conn); void connection_close_immediate(connection_t *conn); diff --git a/src/or/conscache.h b/src/or/conscache.h index 501917bd0..08a5c5a37 100644 --- a/src/or/conscache.h +++ b/src/or/conscache.h @@ -11,11 +11,13 @@ typedef struct consensus_cache_t consensus_cache_t;
HANDLE_DECL(consensus_cache_entry, consensus_cache_entry_t, ) #define consensus_cache_entry_handle_free(h) \ - FREE_AND_NULL(consensus_cache_entry_handle_t, consensus_cache_entry_handle_free_, (h)) + FREE_AND_NULL(consensus_cache_entry_handle_t, \ + consensus_cache_entry_handle_free_, (h))
consensus_cache_t *consensus_cache_open(const char *subdir, int max_entries); void consensus_cache_free_(consensus_cache_t *cache); -#define consensus_cache_free(cache) FREE_AND_NULL(consensus_cache_t, consensus_cache_free_, (cache)) +#define consensus_cache_free(cache) \ + FREE_AND_NULL(consensus_cache_t, consensus_cache_free_, (cache)) struct sandbox_cfg_elem; int consensus_cache_may_overallocate(consensus_cache_t *cache); int consensus_cache_register_with_sandbox(consensus_cache_t *cache, diff --git a/src/or/dircollate.h b/src/or/dircollate.h index f165bdfaf..0584b2fe0 100644 --- a/src/or/dircollate.h +++ b/src/or/dircollate.h @@ -19,7 +19,8 @@ typedef struct dircollator_s dircollator_t;
dircollator_t *dircollator_new(int n_votes, int n_authorities); void dircollator_free_(dircollator_t *obj); -#define dircollator_free(c) FREE_AND_NULL(dircollator_t, dircollator_free_, (c)) +#define dircollator_free(c) \ + FREE_AND_NULL(dircollator_t, dircollator_free_, (c)) void dircollator_add_vote(dircollator_t *dc, networkstatus_t *v);
void dircollator_collate(dircollator_t *dc, int consensus_method); diff --git a/src/or/directory.h b/src/or/directory.h index 08ed5024d..edf75ffe1 100644 --- a/src/or/directory.h +++ b/src/or/directory.h @@ -52,7 +52,8 @@ int directory_must_use_begindir(const or_options_t *options); typedef struct directory_request_t directory_request_t; directory_request_t *directory_request_new(uint8_t dir_purpose); void directory_request_free_(directory_request_t *req); -#define directory_request_free(req) FREE_AND_NULL(directory_request_t, directory_request_free_, (req)) +#define directory_request_free(req) \ + FREE_AND_NULL(directory_request_t, directory_request_free_, (req)) void directory_request_set_or_addr_port(directory_request_t *req, const tor_addr_port_t *p); void directory_request_set_dir_addr_port(directory_request_t *req, diff --git a/src/or/dirserv.h b/src/or/dirserv.h index 7c5006b18..fa9fe9501 100644 --- a/src/or/dirserv.h +++ b/src/or/dirserv.h @@ -196,7 +196,8 @@ spooled_resource_t *spooled_resource_new(dir_spool_source_t source, spooled_resource_t *spooled_resource_new_from_cache_entry( struct consensus_cache_entry_t *entry); void spooled_resource_free_(spooled_resource_t *spooled); -#define spooled_resource_free(sp) FREE_AND_NULL(spooled_resource_t, spooled_resource_free_, (sp)) +#define spooled_resource_free(sp) \ + FREE_AND_NULL(spooled_resource_t, spooled_resource_free_, (sp)) void dirserv_spool_remove_missing_and_guess_size(dir_connection_t *conn, time_t cutoff, int compression, diff --git a/src/or/entrynodes.h b/src/or/entrynodes.h index 32fcfeadf..f2c8d35bf 100644 --- a/src/or/entrynodes.h +++ b/src/or/entrynodes.h @@ -487,7 +487,8 @@ STATIC guard_selection_t *guard_selection_new(const char *name, STATIC guard_selection_t *get_guard_selection_by_name( const char *name, guard_selection_type_t type, int create_if_absent); STATIC void guard_selection_free_(guard_selection_t *gs); -#define guard_selection_free(gs) FREE_AND_NULL(guard_selection_t, guard_selection_free_, (gs)) +#define guard_selection_free(gs) \ + FREE_AND_NULL(guard_selection_t, guard_selection_free_, (gs)) MOCK_DECL(STATIC int, entry_guard_is_listed, (guard_selection_t *gs, const entry_guard_t *guard)); STATIC const char *choose_guard_selection(const or_options_t *options, @@ -572,8 +573,9 @@ STATIC entry_guard_restriction_t *guard_create_exit_restriction( STATIC entry_guard_restriction_t *guard_create_dirserver_md_restriction(void);
STATIC void entry_guard_restriction_free_(entry_guard_restriction_t *rst); -#define entry_guard_restriction_free(rst) \ - FREE_AND_NULL(entry_guard_restriction_t, entry_guard_restriction_free_, (rst)) +#define entry_guard_restriction_free(rst) \ + FREE_AND_NULL(entry_guard_restriction_t, \ + entry_guard_restriction_free_, (rst))
#endif /* defined(ENTRYNODES_PRIVATE) */
diff --git a/src/or/hs_common.h b/src/or/hs_common.h index 10b056787..299d338f4 100644 --- a/src/or/hs_common.h +++ b/src/or/hs_common.h @@ -182,7 +182,8 @@ void hs_build_blinded_keypair(const ed25519_keypair_t *kp, int hs_service_requires_uptime_circ(const smartlist_t *ports);
void rend_data_free_(rend_data_t *data); -#define rend_data_free(data) FREE_AND_NULL(rend_data_t, rend_data_free_, (data)) +#define rend_data_free(data) \ + FREE_AND_NULL(rend_data_t, rend_data_free_, (data)) rend_data_t *rend_data_dup(const rend_data_t *data); rend_data_t *rend_data_client_create(const char *onion_address, const char *desc_id, diff --git a/src/or/hs_descriptor.h b/src/or/hs_descriptor.h index 19158e910..09979410e 100644 --- a/src/or/hs_descriptor.h +++ b/src/or/hs_descriptor.h @@ -209,7 +209,8 @@ hs_desc_is_supported_version(uint32_t version) /* Public API. */
void hs_descriptor_free_(hs_descriptor_t *desc); -#define hs_descriptor_free(desc) FREE_AND_NULL(hs_descriptor_t, hs_descriptor_free_, (desc)) +#define hs_descriptor_free(desc) \ + FREE_AND_NULL(hs_descriptor_t, hs_descriptor_free_, (desc)) void hs_desc_plaintext_data_free_(hs_desc_plaintext_data_t *desc); #define hs_desc_plaintext_data_free(desc) \ FREE_AND_NULL(hs_desc_plaintext_data_t, hs_desc_plaintext_data_free_, (desc)) @@ -243,7 +244,8 @@ size_t hs_desc_plaintext_obj_size(const hs_desc_plaintext_data_t *data);
hs_desc_intro_point_t *hs_desc_intro_point_new(void); void hs_desc_intro_point_free_(hs_desc_intro_point_t *ip); -#define hs_desc_intro_point_free(ip) FREE_AND_NULL(hs_desc_intro_point_t, hs_desc_intro_point_free_, (ip)) +#define hs_desc_intro_point_free(ip) \ + FREE_AND_NULL(hs_desc_intro_point_t, hs_desc_intro_point_free_, (ip))
link_specifier_t *hs_desc_lspec_to_trunnel( const hs_desc_link_specifier_t *spec); diff --git a/src/or/hs_ident.h b/src/or/hs_ident.h index b91e5c79b..91ec389aa 100644 --- a/src/or/hs_ident.h +++ b/src/or/hs_ident.h @@ -120,13 +120,15 @@ hs_ident_circuit_t *hs_ident_circuit_new( const ed25519_public_key_t *identity_pk, hs_ident_circuit_type_t circuit_type); void hs_ident_circuit_free_(hs_ident_circuit_t *ident); -#define hs_ident_circuit_free(id) FREE_AND_NULL(hs_ident_circuit_t, hs_ident_circuit_free_, (id)) +#define hs_ident_circuit_free(id) \ + FREE_AND_NULL(hs_ident_circuit_t, hs_ident_circuit_free_, (id)) hs_ident_circuit_t *hs_ident_circuit_dup(const hs_ident_circuit_t *src);
/* Directory connection identifier API. */ hs_ident_dir_conn_t *hs_ident_dir_conn_dup(const hs_ident_dir_conn_t *src); void hs_ident_dir_conn_free_(hs_ident_dir_conn_t *ident); -#define hs_ident_dir_conn_free(id) FREE_AND_NULL(hs_ident_dir_conn_t, hs_ident_dir_conn_free_, (id)) +#define hs_ident_dir_conn_free(id) \ + FREE_AND_NULL(hs_ident_dir_conn_t, hs_ident_dir_conn_free_, (id)) void hs_ident_dir_conn_init(const ed25519_public_key_t *identity_pk, const ed25519_public_key_t *blinded_pk, hs_ident_dir_conn_t *ident); @@ -135,7 +137,8 @@ void hs_ident_dir_conn_init(const ed25519_public_key_t *identity_pk, hs_ident_edge_conn_t *hs_ident_edge_conn_new( const ed25519_public_key_t *identity_pk); void hs_ident_edge_conn_free_(hs_ident_edge_conn_t *ident); -#define hs_ident_edge_conn_free(id) FREE_AND_NULL(hs_ident_edge_conn_t, hs_ident_edge_conn_free_, (id)) +#define hs_ident_edge_conn_free(id) \ + FREE_AND_NULL(hs_ident_edge_conn_t, hs_ident_edge_conn_free_, (id))
/* Validators */ int hs_ident_intro_circ_is_valid(const hs_ident_circuit_t *ident); diff --git a/src/or/networkstatus.h b/src/or/networkstatus.h index 93fde8c2c..791e32adc 100644 --- a/src/or/networkstatus.h +++ b/src/or/networkstatus.h @@ -19,7 +19,8 @@ void networkstatus_reset_download_failures(void); char *networkstatus_read_cached_consensus(const char *flavorname); int router_reload_consensus_networkstatus(void); void routerstatus_free_(routerstatus_t *rs); -#define routerstatus_free(rs) FREE_AND_NULL(routerstatus_t, routerstatus_free_, (rs)) +#define routerstatus_free(rs) \ + FREE_AND_NULL(routerstatus_t, routerstatus_free_, (rs)) void networkstatus_vote_free_(networkstatus_t *ns); #define networkstatus_vote_free(ns) \ FREE_AND_NULL(networkstatus_t, networkstatus_vote_free_, (ns)) @@ -128,13 +129,15 @@ int32_t networkstatus_get_bw_weight(networkstatus_t *ns, const char *weight, const char *networkstatus_get_flavor_name(consensus_flavor_t flav); int networkstatus_parse_flavor_name(const char *flavname); void document_signature_free_(document_signature_t *sig); -#define document_signature_free(sig) FREE_AND_NULL(document_signature_t, document_signature_free_, (sig)) +#define document_signature_free(sig) \ + FREE_AND_NULL(document_signature_t, document_signature_free_, (sig)) document_signature_t *document_signature_dup(const document_signature_t *sig); void networkstatus_free_all(void); int networkstatus_get_weight_scale_param(networkstatus_t *ns);
void vote_routerstatus_free_(vote_routerstatus_t *rs); -#define vote_routerstatus_free(rs) FREE_AND_NULL(vote_routerstatus_t, vote_routerstatus_free_, (rs)) +#define vote_routerstatus_free(rs) \ + FREE_AND_NULL(vote_routerstatus_t, vote_routerstatus_free_, (rs))
#ifdef NETWORKSTATUS_PRIVATE #ifdef TOR_UNIT_TESTS diff --git a/src/or/onion.h b/src/or/onion.h index 48985700e..3b738debe 100644 --- a/src/or/onion.h +++ b/src/or/onion.h @@ -32,7 +32,8 @@ typedef struct server_onion_keys_t {
server_onion_keys_t *server_onion_keys_new(void); void server_onion_keys_free_(server_onion_keys_t *keys); -#define server_onion_keys_free(keys) FREE_AND_NULL(server_onion_keys_t, server_onion_keys_free_, (keys)) +#define server_onion_keys_free(keys) \ + FREE_AND_NULL(server_onion_keys_t, server_onion_keys_free_, (keys))
void onion_handshake_state_release(onion_handshake_state_t *state);
diff --git a/src/or/policies.h b/src/or/policies.h index 55bf9012b..35220a812 100644 --- a/src/or/policies.h +++ b/src/or/policies.h @@ -119,7 +119,8 @@ void addr_policy_list_free_(smartlist_t *p); #define addr_policy_list_free(lst) \ FREE_AND_NULL(smartlist_t, addr_policy_list_free_, (lst)) void addr_policy_free_(addr_policy_t *p); -#define addr_policy_free(p) FREE_AND_NULL(addr_policy_t, addr_policy_free_, (p)) +#define addr_policy_free(p) \ + FREE_AND_NULL(addr_policy_t, addr_policy_free_, (p)) void policies_free_all(void);
char *policy_summarize(smartlist_t *policy, sa_family_t family); @@ -127,7 +128,8 @@ char *policy_summarize(smartlist_t *policy, sa_family_t family); short_policy_t *parse_short_policy(const char *summary); char *write_short_policy(const short_policy_t *policy); void short_policy_free_(short_policy_t *policy); -#define short_policy_free(p) FREE_AND_NULL(short_policy_t, short_policy_free_, (p)) +#define short_policy_free(p) \ + FREE_AND_NULL(short_policy_t, short_policy_free_, (p)) int short_policy_is_reject_star(const short_policy_t *policy); addr_policy_result_t compare_tor_addr_to_short_policy( const tor_addr_t *addr, uint16_t port, diff --git a/src/or/proto_socks.h b/src/or/proto_socks.h index 492cd13cd..02e0aca7e 100644 --- a/src/or/proto_socks.h +++ b/src/or/proto_socks.h @@ -12,7 +12,8 @@ struct buf_t;
struct socks_request_t *socks_request_new(void); void socks_request_free_(struct socks_request_t *req); -#define socks_request_free(req) FREE_AND_NULL(socks_request_t, socks_request_free_, (req)) +#define socks_request_free(req) \ + FREE_AND_NULL(socks_request_t, socks_request_free_, (req)) int fetch_from_buf_socks(struct buf_t *buf, socks_request_t *req, int log_sockstype, int safe_socks); int fetch_from_buf_socks_client(buf_t *buf, int state, char **reason); diff --git a/src/or/protover.h b/src/or/protover.h index 3c0530a3a..2539c92c3 100644 --- a/src/or/protover.h +++ b/src/or/protover.h @@ -84,7 +84,8 @@ STATIC const char *protocol_type_to_str(protocol_type_t pr); STATIC int str_to_protocol_type(const char *s, protocol_type_t *pr_out); STATIC void proto_entry_free_(proto_entry_t *entry); #endif -#define proto_entry_free(entry) FREE_AND_NULL(proto_entry_t, proto_entry_free_, (entry)) +#define proto_entry_free(entry) \ + FREE_AND_NULL(proto_entry_t, proto_entry_free_, (entry))
#endif /* defined(PROTOVER_PRIVATE) */
diff --git a/src/or/relay.h b/src/or/relay.h index 417942adb..95b8beb3b 100644 --- a/src/or/relay.h +++ b/src/or/relay.h @@ -52,7 +52,8 @@ int have_been_under_memory_pressure(void);
/* For channeltls.c */ void packed_cell_free_(packed_cell_t *cell); -#define packed_cell_free(cell) FREE_AND_NULL(packed_cell_t, packed_cell_free_, (cell)) +#define packed_cell_free(cell) \ + FREE_AND_NULL(packed_cell_t, packed_cell_free_, (cell))
void cell_queue_init(cell_queue_t *queue); void cell_queue_clear(cell_queue_t *queue); @@ -96,7 +97,8 @@ typedef struct address_ttl_s { int ttl; } address_ttl_t; STATIC void address_ttl_free_(address_ttl_t *addr); -#define address_ttl_free(addr) FREE_AND_NULL(address_ttl_t, address_ttl_free_, (addr)) +#define address_ttl_free(addr) \ + FREE_AND_NULL(address_ttl_t, address_ttl_free_, (addr)) STATIC int resolved_cell_parse(const cell_t *cell, const relay_header_t *rh, smartlist_t *addresses_out, int *errcode_out); STATIC int connection_edge_process_resolved_cell(edge_connection_t *conn, diff --git a/src/or/rendcache.h b/src/or/rendcache.h index 30e6a0cc9..66e978564 100644 --- a/src/or/rendcache.h +++ b/src/or/rendcache.h @@ -91,7 +91,8 @@ void rend_cache_increment_allocation(size_t n);
STATIC size_t rend_cache_entry_allocation(const rend_cache_entry_t *e); STATIC void rend_cache_entry_free_(rend_cache_entry_t *e); -#define rend_cache_entry_free(e) FREE_AND_NULL(rend_cache_entry_t, rend_cache_entry_free_, (e)) +#define rend_cache_entry_free(e) \ + FREE_AND_NULL(rend_cache_entry_t, rend_cache_entry_free_, (e)) STATIC void rend_cache_failure_intro_entry_free_(rend_cache_failure_intro_t *entry); #define rend_cache_failure_intro_entry_free(e) \ diff --git a/src/or/rendcommon.h b/src/or/rendcommon.h index 3e1edfbcf..1ed0f6260 100644 --- a/src/or/rendcommon.h +++ b/src/or/rendcommon.h @@ -26,14 +26,17 @@ void rend_process_relay_cell(circuit_t *circ, const crypt_path_t *layer_hint,
void rend_service_descriptor_free_(rend_service_descriptor_t *desc); #define rend_service_descriptor_free(desc) \ - FREE_AND_NULL(rend_service_descriptor_t, rend_service_descriptor_free_, (desc)) + FREE_AND_NULL(rend_service_descriptor_t, rend_service_descriptor_free_, \ + (desc)) int rend_get_service_id(crypto_pk_t *pk, char *out); void rend_encoded_v2_service_descriptor_free_( rend_encoded_v2_service_descriptor_t *desc); #define rend_encoded_v2_service_descriptor_free(desc) \ - FREE_AND_NULL(rend_encoded_v2_service_descriptor_t, rend_encoded_v2_service_descriptor_free_, (desc)) + FREE_AND_NULL(rend_encoded_v2_service_descriptor_t, \ + rend_encoded_v2_service_descriptor_free_, (desc)) void rend_intro_point_free_(rend_intro_point_t *intro); -#define rend_intro_point_free(intro) FREE_AND_NULL(rend_intro_point_t, rend_intro_point_free_, (intro)) +#define rend_intro_point_free(intro) \ + FREE_AND_NULL(rend_intro_point_t, rend_intro_point_free_, (intro))
int rend_valid_v2_service_id(const char *query); int rend_valid_descriptor_id(const char *query); diff --git a/src/or/rendservice.h b/src/or/rendservice.h index 8d11c7682..70ebd8786 100644 --- a/src/or/rendservice.h +++ b/src/or/rendservice.h @@ -118,7 +118,8 @@ typedef struct rend_service_t { } rend_service_t;
STATIC void rend_service_free_(rend_service_t *service); -#define rend_service_free(s) FREE_AND_NULL(rend_service_t, rend_service_free_, (s)) +#define rend_service_free(s) \ + FREE_AND_NULL(rend_service_t, rend_service_free_, (s)) STATIC char *rend_service_sos_poison_path(const rend_service_t *service); STATIC int rend_service_verify_single_onion_poison( const rend_service_t *s, @@ -190,11 +191,13 @@ rend_service_port_config_t *rend_service_parse_port_config(const char *string, char **err_msg_out); void rend_service_port_config_free_(rend_service_port_config_t *p); #define rend_service_port_config_free(p) \ - FREE_AND_NULL(rend_service_port_config_t, rend_service_port_config_free_, (p)) + FREE_AND_NULL(rend_service_port_config_t, rend_service_port_config_free_, \ + (p))
void rend_authorized_client_free_(rend_authorized_client_t *client); #define rend_authorized_client_free(client) \ - FREE_AND_NULL(rend_authorized_client_t, rend_authorized_client_free_, (client)) + FREE_AND_NULL(rend_authorized_client_t, rend_authorized_client_free_, \ + (client))
/** Return value from rend_service_add_ephemeral. */ typedef enum { diff --git a/src/or/replaycache.h b/src/or/replaycache.h index 6b845b929..81a8d907f 100644 --- a/src/or/replaycache.h +++ b/src/or/replaycache.h @@ -34,7 +34,8 @@ struct replaycache_s { /* replaycache_t free/new */
void replaycache_free_(replaycache_t *r); -#define replaycache_free(r) FREE_AND_NULL(replaycache_t, replaycache_free_, (r)) +#define replaycache_free(r) \ + FREE_AND_NULL(replaycache_t, replaycache_free_, (r)) replaycache_t * replaycache_new(time_t horizon, time_t interval);
#ifdef REPLAYCACHE_PRIVATE diff --git a/src/or/routerlist.h b/src/or/routerlist.h index ab510dee3..83f4d1002 100644 --- a/src/or/routerlist.h +++ b/src/or/routerlist.h @@ -97,7 +97,8 @@ const char *signed_descriptor_get_body(const signed_descriptor_t *desc); const char *signed_descriptor_get_annotations(const signed_descriptor_t *desc); routerlist_t *router_get_routerlist(void); void routerinfo_free_(routerinfo_t *router); -#define routerinfo_free(router) FREE_AND_NULL(routerinfo_t, routerinfo_free_, (router)) +#define routerinfo_free(router) \ + FREE_AND_NULL(routerinfo_t, routerinfo_free_, (router)) void extrainfo_free_(extrainfo_t *extrainfo); #define extrainfo_free(ei) FREE_AND_NULL(extrainfo_t, extrainfo_free_, (ei)) void routerlist_free_(routerlist_t *rl); @@ -195,7 +196,8 @@ dir_server_t *fallback_dir_server_new(const tor_addr_t *addr, void dir_server_add(dir_server_t *ent);
void authority_cert_free_(authority_cert_t *cert); -#define authority_cert_free(cert) FREE_AND_NULL(authority_cert_t, authority_cert_free_, (cert)) +#define authority_cert_free(cert) \ + FREE_AND_NULL(authority_cert_t, authority_cert_free_, (cert)) void clear_dir_servers(void); void update_consensus_router_descriptor_downloads(time_t now, int is_vote, networkstatus_t *consensus);
tor-commits@lists.torproject.org