Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(61)

Unified Diff: net/dns/dns_config_service_posix_unittest.cc

Issue 266243004: Clang format slam. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: net/dns/dns_config_service_posix_unittest.cc
diff --git a/net/dns/dns_config_service_posix_unittest.cc b/net/dns/dns_config_service_posix_unittest.cc
index 1bfbe0892af90c484df28a5d5fab4d6d80df20b1..4219a929eaaa40bc6d292a50be6d07fd32a32b73 100644
--- a/net/dns/dns_config_service_posix_unittest.cc
+++ b/net/dns/dns_config_service_posix_unittest.cc
@@ -16,31 +16,28 @@ namespace {
// MAXNS is normally 3, but let's test 4 if possible.
const char* kNameserversIPv4[] = {
- "8.8.8.8",
- "192.168.1.1",
- "63.1.2.4",
- "1.0.0.1",
+ "8.8.8.8", "192.168.1.1", "63.1.2.4", "1.0.0.1",
};
#if defined(OS_LINUX)
const char* kNameserversIPv6[] = {
- NULL,
- "2001:DB8:0::42",
- NULL,
- "::FFFF:129.144.52.38",
+ NULL, "2001:DB8:0::42", NULL, "::FFFF:129.144.52.38",
};
#endif
// Fills in |res| with sane configuration.
void InitializeResState(res_state res) {
memset(res, 0, sizeof(*res));
- res->options = RES_INIT | RES_RECURSE | RES_DEFNAMES | RES_DNSRCH |
- RES_ROTATE;
+ res->options =
+ RES_INIT | RES_RECURSE | RES_DEFNAMES | RES_DNSRCH | RES_ROTATE;
res->ndots = 2;
res->retrans = 4;
res->retry = 7;
- const char kDnsrch[] = "chromium.org" "\0" "example.com";
+ const char kDnsrch[] =
+ "chromium.org"
+ "\0"
+ "example.com";
memcpy(res->defdname, kDnsrch, sizeof(kDnsrch));
res->dnsrch[0] = res->defdname;
res->dnsrch[1] = res->defdname + sizeof("chromium.org");
@@ -61,8 +58,8 @@ void InitializeResState(res_state res) {
if (!kNameserversIPv6[i])
continue;
// Must use malloc to mimick res_ninit.
- struct sockaddr_in6 *sa6;
- sa6 = (struct sockaddr_in6 *)malloc(sizeof(*sa6));
+ struct sockaddr_in6* sa6;
+ sa6 = (struct sockaddr_in6*)malloc(sizeof(*sa6));
sa6->sin6_family = AF_INET6;
sa6->sin6_port = base::HostToNet16(NS_DEFAULTPORT - i);
inet_pton(AF_INET6, kNameserversIPv6[i], &sa6->sin6_addr);

Powered by Google App Engine
This is Rietveld 408576698