[tor-commits] [tor/master] Reduce make check-spaces noise

andrea at torproject.org andrea at torproject.org
Thu Jun 9 11:56:02 UTC 2016


commit 9eeaeddbb1aa04248841890e244c4714f165522d
Author: Andrea Shepard <andrea at torproject.org>
Date:   Thu Jun 9 11:50:25 2016 +0000

    Reduce make check-spaces noise
---
 src/common/di_ops.c      |  1 +
 src/common/di_ops.h      |  3 ++-
 src/common/pubsub.h      |  4 +++-
 src/common/util_bug.h    |  4 ++--
 src/or/connection_edge.c |  3 ++-
 src/or/rendcommon.c      |  1 -
 src/or/routerlist.h      |  3 ++-
 src/test/test-timers.c   |  5 +++--
 src/test/test_crypto.c   | 10 ++++++----
 9 files changed, 21 insertions(+), 13 deletions(-)

diff --git a/src/common/di_ops.c b/src/common/di_ops.c
index e671af6..4ed49e1 100644
--- a/src/common/di_ops.c
+++ b/src/common/di_ops.c
@@ -271,3 +271,4 @@ select_array_member_cumulative_timei(const uint64_t *entries, int n_entries,
 
   return i_chosen;
 }
+
diff --git a/src/common/di_ops.h b/src/common/di_ops.h
index f1050a0..0a15430 100644
--- a/src/common/di_ops.h
+++ b/src/common/di_ops.h
@@ -42,7 +42,8 @@ void dimap_add_entry(di_digest256_map_t **map,
                      const uint8_t *key, void *val);
 void *dimap_search(const di_digest256_map_t *map, const uint8_t *key,
                    void *dflt_val);
-int select_array_member_cumulative_timei(const uint64_t *entries, int n_entries,
+int select_array_member_cumulative_timei(const uint64_t *entries,
+                                         int n_entries,
                                          uint64_t total, uint64_t rand_val);
 
 #endif
diff --git a/src/common/pubsub.h b/src/common/pubsub.h
index 09e492e..bbb4f02 100644
--- a/src/common/pubsub.h
+++ b/src/common/pubsub.h
@@ -21,7 +21,9 @@
  *                                       unsigned priority);
  *     int T_unsubscribe(const T_subscriber_t *)
  *
- * Elsewhere you can say DECLARE_NOTIFY_PUBSUB_TOPIC(static, T), which declares:
+ * Elsewhere you can say DECLARE_NOTIFY_PUBSUB_TOPIC(static, T), which
+ * declares:
+ *
  *    static int T_notify(T_event_data_t *, unsigned notify_flags);
  *    static void T_clear(void);
  *
diff --git a/src/common/util_bug.h b/src/common/util_bug.h
index 36056aa..3f77e0a 100644
--- a/src/common/util_bug.h
+++ b/src/common/util_bug.h
@@ -104,14 +104,14 @@
 
 #ifdef __GNUC__
 #define IF_BUG_ONCE__(cond,var)                                         \
-  if (({                                                                \
+  if (( {                                                                \
       static int var = 0;                                               \
       int bool_result = (cond);                                         \
       if (PREDICT_UNLIKELY(bool_result) && !var) {                      \
         var = 1;                                                        \
         tor_bug_occurred_(SHORT_FILE__, __LINE__, __func__, #cond, 1);  \
       }                                                                 \
-      PREDICT_UNLIKELY(bool_result); }))
+      PREDICT_UNLIKELY(bool_result); } ))
 #else
 #define IF_BUG_ONCE__(cond,var)                                         \
   static int var = 0;                                                   \
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c
index c9aced7..799baa2 100644
--- a/src/or/connection_edge.c
+++ b/src/or/connection_edge.c
@@ -1703,7 +1703,8 @@ connection_ap_handshake_rewrite_and_attach(entry_connection_t *conn,
     /* Fill in the rend_data field so we can start doing a connection to
      * a hidden service. */
     rend_data_t *rend_data = ENTRY_TO_EDGE_CONN(conn)->rend_data =
-      rend_data_client_create(socks->address, NULL, (char *) cookie, auth_type);
+      rend_data_client_create(socks->address, NULL, (char *) cookie,
+                              auth_type);
     if (rend_data == NULL) {
       return -1;
     }
diff --git a/src/or/rendcommon.c b/src/or/rendcommon.c
index 56c49fe..01b0766 100644
--- a/src/or/rendcommon.c
+++ b/src/or/rendcommon.c
@@ -1067,4 +1067,3 @@ rend_auth_decode_cookie(const char *cookie_in, uint8_t *cookie_out,
   return res;
 }
 
-
diff --git a/src/or/routerlist.h b/src/or/routerlist.h
index d5a9b77..be242d6 100644
--- a/src/or/routerlist.h
+++ b/src/or/routerlist.h
@@ -221,7 +221,8 @@ int hex_digest_nickname_matches(const char *hexdigest,
 STATIC int choose_array_element_by_weight(const uint64_t *entries,
                                           int n_entries);
 STATIC void scale_array_elements_to_u64(uint64_t *entries_out,
-                                        const double *entries_in, int n_entries,
+                                        const double *entries_in,
+                                        int n_entries,
                                         uint64_t *total_out);
 STATIC const routerstatus_t *router_pick_directory_server_impl(
                                            dirinfo_type_t auth, int flags,
diff --git a/src/test/test-timers.c b/src/test/test-timers.c
index 8f5ba7b..0196ec1 100644
--- a/src/test/test-timers.c
+++ b/src/test/test-timers.c
@@ -23,10 +23,10 @@
 #define MAX_DURATION 30
 #define N_DISABLE 5
 
-static struct timeval fire_at[N_TIMERS] = {{0,0}};
+static struct timeval fire_at[N_TIMERS] = { {0,0} };
 static int is_disabled[N_TIMERS] = {0};
 static int fired[N_TIMERS] = {0};
-static struct timeval difference[N_TIMERS] = {{0,0}};
+static struct timeval difference[N_TIMERS] = { {0,0} };
 static tor_timer_t *timers[N_TIMERS] = {NULL};
 
 static int n_active_timers = 0;
@@ -131,3 +131,4 @@ main(int argc, char **argv)
   timers_shutdown();
   return ret;
 }
+
diff --git a/src/test/test_crypto.c b/src/test/test_crypto.c
index 0e82223..616b313 100644
--- a/src/test/test_crypto.c
+++ b/src/test/test_crypto.c
@@ -542,7 +542,8 @@ test_crypto_aes_ctr_testvec(void *arg)
   char plaintext[16*4];
   base16_decode(key, sizeof(key), key16, strlen(key16));
   base16_decode(iv, sizeof(iv), ctr16, strlen(ctr16));
-  base16_decode(plaintext, sizeof(plaintext), plaintext16, strlen(plaintext16));
+  base16_decode(plaintext, sizeof(plaintext),
+                plaintext16, strlen(plaintext16));
 
   crypto_cipher_t *c = crypto_cipher_new_with_iv(key, iv);
   crypto_cipher_crypt_inplace(c, plaintext, sizeof(plaintext));
@@ -1396,9 +1397,11 @@ test_crypto_digest_names(void *arg)
   int i;
   for (i = 0; names[i].n; ++i) {
     tt_str_op(names[i].n, OP_EQ,crypto_digest_algorithm_get_name(names[i].a));
-    tt_int_op(names[i].a, OP_EQ,crypto_digest_algorithm_parse_name(names[i].n));
+    tt_int_op(names[i].a,
+              OP_EQ,crypto_digest_algorithm_parse_name(names[i].n));
   }
-  tt_int_op(-1, OP_EQ, crypto_digest_algorithm_parse_name("TimeCubeHash-4444"));
+  tt_int_op(-1, OP_EQ,
+            crypto_digest_algorithm_parse_name("TimeCubeHash-4444"));
  done:
   ;
 }
@@ -1887,7 +1890,6 @@ test_crypto_hkdf_sha256_testvecs(void *arg)
   tor_free(mem_op_hex_tmp);
 }
 
-
 static void
 test_crypto_curve25519_impl(void *arg)
 {



More information about the tor-commits mailing list