Browse Source

Fix "make check-spaces" issues

Nick Mathewson 12 years ago
parent
commit
20d6f787aa
7 changed files with 18 additions and 16 deletions
  1. 1 0
      src/common/address.c
  2. 2 1
      src/common/crypto.c
  3. 0 1
      src/or/config.c
  4. 4 4
      src/or/connection_edge.c
  5. 5 5
      src/or/connection_or.c
  6. 2 1
      src/or/router.c
  7. 4 4
      src/or/routerlist.c

+ 1 - 0
src/common/address.c

@@ -1696,3 +1696,4 @@ tor_addr_hostname_is_local(const char *name)
     !strcasecmp(name, "local") ||
     !strcasecmpend(name, ".local");
 }
+

+ 2 - 1
src/common/crypto.c

@@ -69,7 +69,8 @@
 /** Longest recognized */
 #define MAX_DNS_LABEL_SIZE 63
 
-#if OPENSSL_VERSION_NUMBER < OPENSSL_V_SERIES(0,9,8) && !defined(RUNNING_DOXYGEN)
+#if OPENSSL_VERSION_NUMBER < OPENSSL_V_SERIES(0,9,8) && \
+  !defined(RUNNING_DOXYGEN)
 /** @{ */
 /** On OpenSSL versions before 0.9.8, there is no working SHA256
  * implementation, so we use Tom St Denis's nice speedy one, slightly adapted

+ 0 - 1
src/or/config.c

@@ -820,7 +820,6 @@ get_short_version(void)
   return the_short_tor_version;
 }
 
-
 /** Release additional memory allocated in options
  */
 static void

+ 4 - 4
src/or/connection_edge.c

@@ -2007,8 +2007,8 @@ connection_ap_handshake_rewrite_and_attach(entry_connection_t *conn,
            * then we really don't want to try to connect to it.  That's
            * probably an error. */
           if (conn->is_transparent_ap) {
-#define WARN_INTERVAL_LOOP 300
-            static ratelim_t loop_warn_limit = RATELIM_INIT(WARN_INTERVAL_LOOP);
+#define WARN_INTRVL_LOOP 300
+            static ratelim_t loop_warn_limit = RATELIM_INIT(WARN_INTRVL_LOOP);
             char *m;
             if ((m = rate_limit_log(&loop_warn_limit, approx_time()))) {
               log_warn(LD_NET,
@@ -2019,8 +2019,8 @@ connection_ap_handshake_rewrite_and_attach(entry_connection_t *conn,
               tor_free(m);
             }
           } else {
-#define WARN_INTERVAL_PRIV 300
-            static ratelim_t priv_warn_limit = RATELIM_INIT(WARN_INTERVAL_PRIV);
+#define WARN_INTRVL_PRIV 300
+            static ratelim_t priv_warn_limit = RATELIM_INIT(WARN_INTRVL_PRIV);
             char *m;
             if ((m = rate_limit_log(&priv_warn_limit, approx_time()))) {
               log_warn(LD_NET,

+ 5 - 5
src/or/connection_or.c

@@ -405,11 +405,11 @@ connection_or_process_inbuf(or_connection_t *conn)
    * 100% true. */
   if (buf_datalen(conn->_base.inbuf) > MAX_OR_INBUF_WHEN_NONOPEN) {
     log_fn(LOG_PROTOCOL_WARN, LD_NET, "Accumulated too much data (%d bytes) "
-	   "on nonopen OR connection %s %s:%u in state %s; closing.",
-	   (int)buf_datalen(conn->_base.inbuf),
-	   connection_or_nonopen_was_started_here(conn) ? "to" : "from",
-	   conn->_base.address, conn->_base.port,
-	   conn_state_to_string(conn->_base.type, conn->_base.state));
+           "on nonopen OR connection %s %s:%u in state %s; closing.",
+           (int)buf_datalen(conn->_base.inbuf),
+           connection_or_nonopen_was_started_here(conn) ? "to" : "from",
+           conn->_base.address, conn->_base.port,
+           conn_state_to_string(conn->_base.type, conn->_base.state));
     connection_mark_for_close(TO_CONN(conn));
     ret = -1;
   }

+ 2 - 1
src/or/router.c

@@ -1954,7 +1954,8 @@ router_guess_address_from_dir_headers(uint32_t *guess)
 void
 get_platform_str(char *platform, size_t len)
 {
-  tor_snprintf(platform, len, "Tor %s on %s", get_short_version(), get_uname());
+  tor_snprintf(platform, len, "Tor %s on %s",
+               get_short_version(), get_uname());
 }
 
 /* XXX need to audit this thing and count fenceposts. maybe

+ 4 - 4
src/or/routerlist.c

@@ -5014,12 +5014,12 @@ update_router_have_minimum_dir_info(void)
 
 /* What fraction of desired server descriptors do we need before we will
  * build circuits? */
-#define FRACTION_USABLE_NEEDED .75
+#define FRAC_USABLE_NEEDED .75
 /* What fraction of desired _exit_ server descriptors do we need before we
  * will build circuits? */
-#define FRACTION_EXIT_USABLE_NEEDED .5
+#define FRAC_EXIT_USABLE_NEEDED .5
 
-  if (num_present < num_usable * FRACTION_USABLE_NEEDED) {
+  if (num_present < num_usable * FRAC_USABLE_NEEDED) {
     tor_snprintf(dir_info_status, sizeof(dir_info_status),
                  "We have only %d/%d usable %sdescriptors.",
                  num_present, num_usable, using_md ? "micro" : "");
@@ -5032,7 +5032,7 @@ update_router_have_minimum_dir_info(void)
                  num_present, using_md ? "micro" : "", num_present ? "" : "s");
     res = 0;
     goto done;
-  } else if (num_exit_present < num_exit_usable * FRACTION_EXIT_USABLE_NEEDED) {
+  } else if (num_exit_present < num_exit_usable * FRAC_EXIT_USABLE_NEEDED) {
     tor_snprintf(dir_info_status, sizeof(dir_info_status),
                  "We have only %d/%d usable exit node descriptors.",
                  num_exit_present, num_exit_usable);