[tor-commits] [tor/master] Appease make check-spaces

andrea at torproject.org andrea at torproject.org
Mon Jun 1 12:59:55 UTC 2015


commit 0e0b65db4f0f0c67bcbb3f51a9e6061bc4c96c5e
Author: Andrea Shepard <andrea at torproject.org>
Date:   Mon Jun 1 12:59:14 2015 +0000

    Appease make check-spaces
---
 src/common/aes.c               |    1 +
 src/common/crypto_ed25519.h    |    1 -
 src/common/tortls.c            |    3 ++-
 src/or/channeltls.c            |    2 +-
 src/or/control.c               |    2 +-
 src/or/dircollate.c            |    6 ++++--
 src/or/dircollate.h            |    1 +
 src/or/or.h                    |    1 -
 src/or/rendservice.c           |    3 ++-
 src/or/routerkeys.c            |    9 ++++++---
 src/or/routerlist.c            |    3 ++-
 src/or/routerparse.c           |    6 ++++--
 src/or/torcert.c               |    1 +
 src/test/test_buffers.c        |    1 -
 src/test/test_hs.c             |    5 +++--
 src/test/test_link_handshake.c |    3 +--
 16 files changed, 29 insertions(+), 19 deletions(-)

diff --git a/src/common/aes.c b/src/common/aes.c
index dbc12dc..8b9d81f 100644
--- a/src/common/aes.c
+++ b/src/common/aes.c
@@ -501,3 +501,4 @@ aes_set_iv(aes_cnt_cipher_t *cipher, const char *iv)
 }
 
 #endif
+
diff --git a/src/common/crypto_ed25519.h b/src/common/crypto_ed25519.h
index 8ffb9f2..4d20406 100644
--- a/src/common/crypto_ed25519.h
+++ b/src/common/crypto_ed25519.h
@@ -88,7 +88,6 @@ int ed25519_public_blind(ed25519_public_key_t *out,
                          const ed25519_public_key_t *inp,
                          const uint8_t *param);
 
-
 /* XXXX move these to crypto_format.h */
 #define ED25519_BASE64_LEN 43
 int ed25519_public_from_base64(ed25519_public_key_t *pkey,
diff --git a/src/common/tortls.c b/src/common/tortls.c
index 098df9d..a4b6c48 100644
--- a/src/common/tortls.c
+++ b/src/common/tortls.c
@@ -1810,7 +1810,8 @@ rectify_client_ciphers(SSL *ssl)
                   SSL_CIPHER_get_name(cipher));
         ++j;
       } else if (cipher &&
-                 (SSL_CIPHER_get_id(cipher) & 0xffff) == CLIENT_CIPHER_INFO_LIST[i].id) {
+                 (SSL_CIPHER_get_id(cipher) & 0xffff) ==
+                  CLIENT_CIPHER_INFO_LIST[i].id) {
         /* "cipher" is the cipher we expect. Put it on the list. */
         log_debug(LD_NET, "Found cipher %s", SSL_CIPHER_get_name(cipher));
         sk_SSL_CIPHER_push(CLIENT_CIPHER_STACK, cipher);
diff --git a/src/or/channeltls.c b/src/or/channeltls.c
index ecf0218..c90f569 100644
--- a/src/or/channeltls.c
+++ b/src/or/channeltls.c
@@ -2004,7 +2004,7 @@ channel_tls_process_auth_challenge_cell(var_cell_t *cell, channel_tls_t *chan)
     goto done;
   }
 
-done:
+ done:
   auth_challenge_cell_free(ac);
 
 #undef ERR
diff --git a/src/or/control.c b/src/or/control.c
index 746dfff..2eaad4e 100644
--- a/src/or/control.c
+++ b/src/or/control.c
@@ -6029,7 +6029,7 @@ get_desc_id_from_query(const rend_data_t *rend_data, const char *hsdir_fp)
     } SMARTLIST_FOREACH_END(fingerprint);
   }
 
-end:
+ end:
   return desc_id;
 }
 
diff --git a/src/or/dircollate.c b/src/or/dircollate.c
index 20dfb35..34259ec 100644
--- a/src/or/dircollate.c
+++ b/src/or/dircollate.c
@@ -59,8 +59,10 @@ ddmap_entry_set_digests(ddmap_entry_t *ent,
   memcpy(ent->d + DIGEST_LEN, ed25519, DIGEST256_LEN);
 }
 
-HT_PROTOTYPE(double_digest_map, ddmap_entry_s, node, ddmap_entry_hash, ddmap_entry_eq);
-HT_GENERATE2(double_digest_map, ddmap_entry_s, node, ddmap_entry_hash, ddmap_entry_eq, 0.6, tor_reallocarray, tor_free_);
+HT_PROTOTYPE(double_digest_map, ddmap_entry_s, node, ddmap_entry_hash,
+             ddmap_entry_eq);
+HT_GENERATE2(double_digest_map, ddmap_entry_s, node, ddmap_entry_hash,
+             ddmap_entry_eq, 0.6, tor_reallocarray, tor_free_);
 static void
 dircollator_add_routerstatus(dircollator_t *dc,
                              int vote_num,
diff --git a/src/or/dircollate.h b/src/or/dircollate.h
index 9eba37a..cd1e8ac 100644
--- a/src/or/dircollate.h
+++ b/src/or/dircollate.h
@@ -47,3 +47,4 @@ struct dircollator_s {
 #endif
 
 #endif
+
diff --git a/src/or/or.h b/src/or/or.h
index 81e1c1c..ec5f277 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -4281,7 +4281,6 @@ typedef struct {
    * XXXX Eventually, the default will be 0. */
   int ExitRelay;
 
-
   /** For how long (seconds) do we declare our singning keys to be valid? */
   int SigningKeyLifetime;
   /** For how long (seconds) do we declare our link keys to be valid? */
diff --git a/src/or/rendservice.c b/src/or/rendservice.c
index d27b06d..c857d4c 100644
--- a/src/or/rendservice.c
+++ b/src/or/rendservice.c
@@ -581,7 +581,8 @@ rend_config_services(const or_options_t *options, int validate_only)
                                                         10, 0, 1, &ok, NULL);
       if (!ok) {
         log_warn(LD_CONFIG,
-                 "HiddenServiceMaxStreamsCloseCircuit should be 0 or 1, not %s",
+                 "HiddenServiceMaxStreamsCloseCircuit should be 0 or 1, "
+                 "not %s",
                  line->value);
         rend_service_free(service);
         return -1;
diff --git a/src/or/routerkeys.c b/src/or/routerkeys.c
index a76bf99..8b1ade5 100644
--- a/src/or/routerkeys.c
+++ b/src/or/routerkeys.c
@@ -312,7 +312,8 @@ load_ed_keys(const or_options_t *options, time_t now)
     check_signing_cert = signing_key_cert;
     use_signing = master_signing_key;
   } else {
-    char *fname = options_get_datadir_fname2(options, "keys", "ed25519_signing");
+    char *fname =
+      options_get_datadir_fname2(options, "keys", "ed25519_signing");
     sign = ed_key_init_from_file(
                fname,
                INIT_ED_KEY_NEEDCERT|
@@ -340,7 +341,8 @@ load_ed_keys(const or_options_t *options, time_t now)
     if (! want_new_signing_key)
       flags |= INIT_ED_KEY_OMIT_SECRET;
 
-    char *fname = options_get_datadir_fname2(options, "keys", "ed25519_master_id");
+    char *fname =
+      options_get_datadir_fname2(options, "keys", "ed25519_master_id");
     id = ed_key_init_from_file(
              fname,
              flags,
@@ -363,7 +365,8 @@ load_ed_keys(const or_options_t *options, time_t now)
                       INIT_ED_KEY_EXTRA_STRONG|
                       INIT_ED_KEY_NEEDCERT|
                       INIT_ED_KEY_INCLUDE_SIGNING_KEY_IN_CERT);
-    char *fname = options_get_datadir_fname2(options, "keys", "ed25519_signing");
+    char *fname =
+      options_get_datadir_fname2(options, "keys", "ed25519_signing");
     sign = ed_key_init_from_file(fname,
                                  flags, LOG_WARN,
                                  sign_signing_key_with_id, now,
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index 7eba13a..3502196 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -4921,7 +4921,8 @@ routerinfo_incompatible_with_extrainfo(const routerinfo_t *ri,
    * digest256 was in the ri. */
   digest256_matches = tor_memeq(ei->digest256,
                                 ri->extra_info_digest256, DIGEST256_LEN);
-  digest256_matches |= tor_mem_is_zero(ri->extra_info_digest256, DIGEST256_LEN);
+  digest256_matches |=
+    tor_mem_is_zero(ri->extra_info_digest256, DIGEST256_LEN);
 
   /* The identity must match exactly to have been generated at the same time
    * by the same router. */
diff --git a/src/or/routerparse.c b/src/or/routerparse.c
index 1835bf8..1413d40 100644
--- a/src/or/routerparse.c
+++ b/src/or/routerparse.c
@@ -2352,7 +2352,8 @@ routerstatus_parse_entry_from_string(memarea_t *area,
         if (!strcmp(t->args[0], "ed25519")) {
           vote_rs->has_ed25519_listing = 1;
           if (strcmp(t->args[1], "none") &&
-              digest256_from_base64((char*)vote_rs->ed25519_id, t->args[1])<0) {
+              digest256_from_base64((char*)vote_rs->ed25519_id,
+                                    t->args[1])<0) {
             log_warn(LD_DIR, "Bogus ed25519 key in networkstatus vote");
             goto err;
           }
@@ -3184,7 +3185,8 @@ networkstatus_parse_vote_from_string(const char *s, const char **eos_out,
   }
   if (ns_type != NS_TYPE_CONSENSUS) {
     digest256map_t *ed_id_map = digest256map_new();
-    SMARTLIST_FOREACH_BEGIN(ns->routerstatus_list, vote_routerstatus_t *, vrs) {
+    SMARTLIST_FOREACH_BEGIN(ns->routerstatus_list, vote_routerstatus_t *,
+                            vrs) {
       if (! vrs->has_ed25519_listing ||
           tor_mem_is_zero((const char *)vrs->ed25519_id, DIGEST256_LEN))
         continue;
diff --git a/src/or/torcert.c b/src/or/torcert.c
index 838501e..f028910 100644
--- a/src/or/torcert.c
+++ b/src/or/torcert.c
@@ -282,3 +282,4 @@ tor_make_rsa_ed25519_crosscert(const ed25519_public_key_t *ed_key,
   *cert = res;
   return sz;
 }
+
diff --git a/src/test/test_buffers.c b/src/test/test_buffers.c
index 22ee6aa..e8fce12 100644
--- a/src/test/test_buffers.c
+++ b/src/test/test_buffers.c
@@ -744,7 +744,6 @@ test_buffers_tls_read_mocked(void *arg)
   next_reply_val[1] = 5000;
   tt_int_op(6000, ==, read_to_buf_tls(NULL, 6000, buf));
 
-
  done:
   UNMOCK(tor_tls_read);
   tor_free(mem);
diff --git a/src/test/test_hs.c b/src/test/test_hs.c
index fc265bc..6d01798 100644
--- a/src/test/test_hs.c
+++ b/src/test/test_hs.c
@@ -210,8 +210,9 @@ test_hs_desc_event(void *arg)
 
   /* test valid content. */
   char *exp_msg;
-  control_event_hs_descriptor_content(rend_query.onion_address, STR_HS_CONTENT_DESC_ID,
-                                      HSDIR_EXIST_ID, hs_desc_content);
+  control_event_hs_descriptor_content(rend_query.onion_address,
+                                      STR_HS_CONTENT_DESC_ID, HSDIR_EXIST_ID,
+                                      hs_desc_content);
   tor_asprintf(&exp_msg, "650+HS_DESC_CONTENT " STR_HS_ADDR " "\
                STR_HS_CONTENT_DESC_ID " " STR_HSDIR_EXIST_LONGNAME\
                "\r\n%s\r\n.\r\n650 OK\r\n", hs_desc_content);
diff --git a/src/test/test_link_handshake.c b/src/test/test_link_handshake.c
index b3b6531..0b3900e 100644
--- a/src/test/test_link_handshake.c
+++ b/src/test/test_link_handshake.c
@@ -197,7 +197,6 @@ typedef struct certs_data_s {
   crypto_pk_t *key1, *key2;
 } certs_data_t;
 
-
 static int
 recv_certs_cleanup(const struct testcase_t *test, void *obj)
 {
@@ -593,7 +592,6 @@ AUTHCHALLENGE_FAIL(truncated,
 AUTHCHALLENGE_FAIL(nonzero_circid,
                    d->cell->circ_id = 1337)
 
-
 static tor_x509_cert_t *mock_peer_cert = NULL;
 static tor_x509_cert_t *
 mock_get_peer_cert(tor_tls_t *tls)
@@ -914,3 +912,4 @@ struct testcase_t link_handshake_tests[] = {
 
   END_OF_TESTCASES
 };
+



More information about the tor-commits mailing list