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

Unified Diff: net/dns/dns_config_service_posix.cc

Issue 826973002: replace COMPILE_ASSERT with static_assert in net/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: apply fixups Created 5 years, 11 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
« no previous file with comments | « net/disk_cache/simple/simple_test_util.h ('k') | net/dns/dns_session.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/dns/dns_config_service_posix.cc
diff --git a/net/dns/dns_config_service_posix.cc b/net/dns/dns_config_service_posix.cc
index 6b79f9c2e0a17051f4376359e53469fbbd54d6fe..42582bea125a6857e16c0fa6f5da20dc27fd17cd 100644
--- a/net/dns/dns_config_service_posix.cc
+++ b/net/dns/dns_config_service_posix.cc
@@ -411,9 +411,9 @@ ConfigParsePosixResult ConvertResStateToDnsConfig(const struct __res_state& res,
dns_config->nameservers.push_back(ipe);
}
#elif defined(OS_LINUX)
- COMPILE_ASSERT(arraysize(res.nsaddr_list) >= MAXNS &&
- arraysize(res._u._ext.nsaddrs) >= MAXNS,
- incompatible_libresolv_res_state);
+ static_assert(arraysize(res.nsaddr_list) >= MAXNS &&
+ arraysize(res._u._ext.nsaddrs) >= MAXNS,
+ "incompatible libresolv res_state");
DCHECK_LE(res.nscount, MAXNS);
// Initially, glibc stores IPv6 in |_ext.nsaddrs| and IPv4 in |nsaddr_list|.
// In res_send.c:res_nsend, it merges |nsaddr_list| into |nsaddrs|,
« no previous file with comments | « net/disk_cache/simple/simple_test_util.h ('k') | net/dns/dns_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698