[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] Cleanup MOCK_IMPL (etc) to be findable with etags



commit 6fcaf83c98df4a12149cd4b5956cd96f3e59ccfd
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Fri May 26 14:05:50 2017 -0400

    Cleanup MOCK_IMPL (etc) to be findable with etags
    
    A fair number of our mock_impl declarations were messed up so that
    even our special AM_ETAGSFLAGS couldn't find them.
    
    This should be a whitespace-only patch.
---
 src/common/address.c |  7 ++++---
 src/common/compat.c  |  3 ++-
 src/common/crypto.c  |  6 +++---
 src/common/tortls.c  | 12 ++++++------
 src/or/circuitlist.c |  4 ++--
 src/or/control.c     |  4 ++--
 src/or/directory.c   |  3 ++-
 src/or/dns.c         |  4 ++--
 src/or/routerlist.c  | 11 ++++++-----
 9 files changed, 29 insertions(+), 25 deletions(-)

diff --git a/src/common/address.c b/src/common/address.c
index a6fd8c0..894e151 100644
--- a/src/common/address.c
+++ b/src/common/address.c
@@ -1781,9 +1781,10 @@ free_interface_address6_list(smartlist_t *addrs)
  * Returns NULL on failure.
  * Use free_interface_address6_list to free the returned list.
  */
-MOCK_IMPL(smartlist_t *,get_interface_address6_list,(int severity,
-                                                     sa_family_t family,
-                                                     int include_internal))
+MOCK_IMPL(smartlist_t *,
+get_interface_address6_list,(int severity,
+                             sa_family_t family,
+                             int include_internal))
 {
   smartlist_t *addrs;
   tor_addr_t addr;
diff --git a/src/common/compat.c b/src/common/compat.c
index 390cff7..4f38c64 100644
--- a/src/common/compat.c
+++ b/src/common/compat.c
@@ -2678,7 +2678,8 @@ static int uname_result_is_set = 0;
 
 /** Return a pointer to a description of our platform.
  */
-MOCK_IMPL(const char *, get_uname, (void))
+MOCK_IMPL(const char *,
+get_uname,(void))
 {
 #ifdef HAVE_UNAME
   struct utsname u;
diff --git a/src/common/crypto.c b/src/common/crypto.c
index a685101..0fc8474 100644
--- a/src/common/crypto.c
+++ b/src/common/crypto.c
@@ -479,7 +479,7 @@ crypto_pk_get_rsa_(crypto_pk_t *env)
  * private is set, include the private-key portion of the key. Return a valid
  * pointer on success, and NULL on failure. */
 MOCK_IMPL(EVP_PKEY *,
-          crypto_pk_get_evp_pkey_,(crypto_pk_t *env, int private))
+crypto_pk_get_evp_pkey_,(crypto_pk_t *env, int private))
 {
   RSA *key = NULL;
   EVP_PKEY *pkey = NULL;
@@ -516,7 +516,7 @@ crypto_dh_get_dh_(crypto_dh_t *dh)
  * be set.
  */
 MOCK_IMPL(crypto_pk_t *,
-          crypto_pk_new,(void))
+crypto_pk_new,(void))
 {
   RSA *rsa;
 
@@ -606,7 +606,7 @@ crypto_cipher_free(crypto_cipher_t *env)
  * Return 0 on success, -1 on failure.
  */
 MOCK_IMPL(int,
-          crypto_pk_generate_key_with_bits,(crypto_pk_t *env, int bits))
+crypto_pk_generate_key_with_bits,(crypto_pk_t *env, int bits))
 {
   tor_assert(env);
 
diff --git a/src/common/tortls.c b/src/common/tortls.c
index fadf52f..42fb91a 100644
--- a/src/common/tortls.c
+++ b/src/common/tortls.c
@@ -460,11 +460,11 @@ tor_x509_name_new(const char *cname)
  * Return a certificate on success, NULL on failure.
  */
 MOCK_IMPL(STATIC X509 *,
-          tor_tls_create_certificate,(crypto_pk_t *rsa,
-                                      crypto_pk_t *rsa_sign,
-                                      const char *cname,
-                                      const char *cname_sign,
-                                      unsigned int cert_lifetime))
+tor_tls_create_certificate,(crypto_pk_t *rsa,
+                            crypto_pk_t *rsa_sign,
+                            const char *cname,
+                            const char *cname_sign,
+                            unsigned int cert_lifetime))
 {
   /* OpenSSL generates self-signed certificates with random 64-bit serial
    * numbers, so let's do that too. */
@@ -662,7 +662,7 @@ tor_x509_cert_free(tor_x509_cert_t *cert)
  * Steals a reference to x509_cert.
  */
 MOCK_IMPL(STATIC tor_x509_cert_t *,
-          tor_x509_cert_new,(X509 *x509_cert))
+tor_x509_cert_new,(X509 *x509_cert))
 {
   tor_x509_cert_t *cert;
   EVP_PKEY *pkey;
diff --git a/src/or/circuitlist.c b/src/or/circuitlist.c
index 5761890..86b0aa0 100644
--- a/src/or/circuitlist.c
+++ b/src/or/circuitlist.c
@@ -359,8 +359,8 @@ channel_note_destroy_pending(channel_t *chan, circid_t id)
 
 /** Called to indicate that a DESTROY is no longer pending on <b>chan</b> with
  * circuit ID <b>id</b> -- typically, because it has been sent. */
-MOCK_IMPL(void, channel_note_destroy_not_pending,
-          (channel_t *chan, circid_t id))
+MOCK_IMPL(void,
+channel_note_destroy_not_pending,(channel_t *chan, circid_t id))
 {
   circuit_t *circ = circuit_get_by_circid_channel_even_if_marked(id,chan);
   if (circ) {
diff --git a/src/or/control.c b/src/or/control.c
index 083768c..9454a7a 100644
--- a/src/or/control.c
+++ b/src/or/control.c
@@ -6709,8 +6709,8 @@ control_event_bootstrap(bootstrap_status_t status, int progress)
  * is the connection that caused this problem.
  */
 MOCK_IMPL(void,
-          control_event_bootstrap_problem, (const char *warn, int reason,
-                                            or_connection_t *or_conn))
+control_event_bootstrap_problem, (const char *warn, int reason,
+                                  or_connection_t *or_conn))
 {
   int status = bootstrap_percent;
   const char *tag = "", *summary = "";
diff --git a/src/or/directory.c b/src/or/directory.c
index a8f9788..acd694f 100644
--- a/src/or/directory.c
+++ b/src/or/directory.c
@@ -565,7 +565,8 @@ dir_consensus_request_set_additional_headers(directory_request_t *req,
  * Use <b>pds_flags</b> as arguments to router_pick_directory_server()
  * or router_pick_trusteddirserver().
  */
-MOCK_IMPL(void, directory_get_from_dirserver, (
+MOCK_IMPL(void,
+directory_get_from_dirserver,(
                             uint8_t dir_purpose,
                             uint8_t router_purpose,
                             const char *resource,
diff --git a/src/or/dns.c b/src/or/dns.c
index 024a21a..8a40a70 100644
--- a/src/or/dns.c
+++ b/src/or/dns.c
@@ -2086,8 +2086,8 @@ assert_cache_ok_(void)
 
 #endif
 
-cached_resolve_t
-*dns_get_cache_entry(cached_resolve_t *query)
+cached_resolve_t *
+dns_get_cache_entry(cached_resolve_t *query)
 {
   return HT_FIND(cache_map, &cache_root, query);
 }
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index a790265..0e45f63 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -426,8 +426,8 @@ list_sk_digests_for_authority_id, (const char *digest))
  * download_status_t or NULL if none exists. */
 
 MOCK_IMPL(download_status_t *,
-  download_status_for_authority_id_and_sk,
-  (const char *id_digest, const char *sk_digest))
+download_status_for_authority_id_and_sk,(const char *id_digest,
+                                         const char *sk_digest))
 {
   download_status_t *dl = NULL;
   cert_list_t *cl = NULL;
@@ -4874,9 +4874,10 @@ list_pending_fpsk_downloads(fp_pair_map_t *result)
  * range.)  If <b>source</b> is given, download from <b>source</b>;
  * otherwise, download from an appropriate random directory server.
  */
-MOCK_IMPL(STATIC void, initiate_descriptor_downloads,
-          (const routerstatus_t *source, int purpose, smartlist_t *digests,
-           int lo, int hi, int pds_flags))
+MOCK_IMPL(STATIC void,
+initiate_descriptor_downloads,(const routerstatus_t *source,
+                               int purpose, smartlist_t *digests,
+                               int lo, int hi, int pds_flags))
 {
   char *resource, *cp;
   int digest_len, enc_digest_len;

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits