[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/master] Fix a bunch of check-spaces complaints
commit 77bc1b803e0d58b23ff48c2359300ef812f10ee1
Author: Sebastian Hahn <sebastian@xxxxxxxxxxxxxx>
Date: Wed Mar 28 15:02:15 2012 +0200
Fix a bunch of check-spaces complaints
---
src/or/connection.c | 3 ++-
src/or/networkstatus.c | 4 ++--
src/test/test_util.c | 11 ++++-------
3 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/src/or/connection.c b/src/or/connection.c
index afdda92..c9093fe 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -913,7 +913,8 @@ connection_listener_new(const struct sockaddr *listensockaddr,
#endif
/* We need to set IPV6_V6ONLY so that this socket can't get used for
* IPv4 connections. */
- if (setsockopt(s,IPPROTO_IPV6, IPV6_V6ONLY, (void*)&one, sizeof(one))<0) {
+ if (setsockopt(s,IPPROTO_IPV6, IPV6_V6ONLY,
+ (void*)&one, sizeof(one))<0) {
int e = tor_socket_errno(s);
log_warn(LD_NET, "Error setting IPV6_V6ONLY flag: %s",
tor_socket_strerror(e));
diff --git a/src/or/networkstatus.c b/src/or/networkstatus.c
index afd531a..910b99c 100644
--- a/src/or/networkstatus.c
+++ b/src/or/networkstatus.c
@@ -1357,8 +1357,8 @@ update_consensus_networkstatus_fetch_time_impl(time_t now, int flav)
format_local_iso_time(tbuf1, c->fresh_until);
format_local_iso_time(tbuf2, c->valid_until);
format_local_iso_time(tbuf3, time_to_download_next_consensus[flav]);
- log_info(LD_DIR, "Live %s consensus %s the most recent until %s and will "
- "expire at %s; fetching the next one at %s.",
+ log_info(LD_DIR, "Live %s consensus %s the most recent until %s and "
+ "will expire at %s; fetching the next one at %s.",
flavor, (c->fresh_until > now) ? "will be" : "was",
tbuf1, tbuf2, tbuf3);
}
diff --git a/src/test/test_util.c b/src/test/test_util.c
index 9da4cb7..0f9d1a7 100644
--- a/src/test/test_util.c
+++ b/src/test/test_util.c
@@ -50,7 +50,6 @@ test_util_time(void)
test_eq(-1005000L, tv_udiff(&start, &end));
-
/* Test tor_timegm */
/* The test values here are confirmed to be correct on a platform
@@ -77,7 +76,6 @@ test_util_time(void)
a_time.tm_mday = 10;
test_eq((time_t) -1, tor_timegm(&a_time));
-
/* Test {format,parse}_rfc1123_time */
format_rfc1123_time(timestr, 0);
@@ -110,7 +108,6 @@ test_util_time(void)
test_eq(-1, parse_rfc1123_time("Wed, 30 Mar 2011 23:59:61 GMT", &t_res));
#endif
-
/* Test parse_iso_time */
t_res = 0;
@@ -140,7 +137,6 @@ test_util_time(void)
test_eq(-1, parse_iso_time("2011-00-30 23:59:59 GMT", &t_res));
test_eq(-1, parse_iso_time("2011-03-30 23:59", &t_res));
-
/* Test tor_gettimeofday */
end.tv_sec = 4;
@@ -154,7 +150,6 @@ test_util_time(void)
/* We might've timewarped a little. */
tt_int_op(tv_udiff(&start, &end), >=, -5000);
-
/* Test format_iso_time */
tv.tv_sec = (time_t)1326296338;
@@ -910,7 +905,8 @@ test_util_strmisc(void)
wrap_string(sl, "A test of string wrapping...", 6, "### ", "# ");
cp = smartlist_join_strings(sl, "", 0, NULL);
- test_streq(cp, "### A\n# test\n# of\n# stri\n# ng\n# wrap\n# ping\n# ...\n");
+ test_streq(cp,
+ "### A\n# test\n# of\n# stri\n# ng\n# wrap\n# ping\n# ...\n");
tor_free(cp);
SMARTLIST_FOREACH(sl, char *, cp, tor_free(cp));
smartlist_clear(sl);
@@ -924,7 +920,8 @@ test_util_strmisc(void)
wrap_string(sl, "Small test", 6, "### ", "#### ");
cp = smartlist_join_strings(sl, "", 0, NULL);
- test_streq(cp, "### Sm\n#### a\n#### l\n#### l\n#### t\n#### e\n#### s\n#### t\n");
+ test_streq(cp, "### Sm\n#### a\n#### l\n#### l\n#### t\n#### e"
+ "\n#### s\n#### t\n");
tor_free(cp);
SMARTLIST_FOREACH(sl, char *, cp, tor_free(cp));
smartlist_clear(sl);
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits