Fix a bunch of check-spaces complaints

This commit is contained in:
Sebastian Hahn 2012-03-28 15:02:15 +02:00
parent c3a7bcf4e6
commit 77bc1b803e
3 changed files with 8 additions and 10 deletions

View File

@ -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));

View File

@ -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);
}

View File

@ -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);