[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/master] Fix "make check-spaces" issues
commit 20d6f787aaea3252a07e5913e67cf63d60de4d9f
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date: Tue Jun 5 00:49:18 2012 -0400
Fix "make check-spaces" issues
---
src/common/address.c | 1 +
src/common/crypto.c | 3 ++-
src/or/config.c | 1 -
src/or/connection_edge.c | 8 ++++----
src/or/connection_or.c | 10 +++++-----
src/or/router.c | 3 ++-
src/or/routerlist.c | 8 ++++----
7 files changed, 18 insertions(+), 16 deletions(-)
diff --git a/src/common/address.c b/src/common/address.c
index c734c6f..e56465f 100644
--- a/src/common/address.c
+++ b/src/common/address.c
@@ -1696,3 +1696,4 @@ tor_addr_hostname_is_local(const char *name)
!strcasecmp(name, "local") ||
!strcasecmpend(name, ".local");
}
+
diff --git a/src/common/crypto.c b/src/common/crypto.c
index 9073d81..a69e6c5 100644
--- a/src/common/crypto.c
+++ b/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
diff --git a/src/or/config.c b/src/or/config.c
index 1dce16f..ce90c41 100644
--- a/src/or/config.c
+++ b/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
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c
index 51bd1ef..63a3213 100644
--- a/src/or/connection_edge.c
+++ b/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,
diff --git a/src/or/connection_or.c b/src/or/connection_or.c
index b5ef482..cbb1110 100644
--- a/src/or/connection_or.c
+++ b/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;
}
diff --git a/src/or/router.c b/src/or/router.c
index a5addca..b98bb39 100644
--- a/src/or/router.c
+++ b/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
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index 42063f2..c3e6f48 100644
--- a/src/or/routerlist.c
+++ b/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);
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits