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

Unified Diff: src/platform-posix.cc

Issue 3172008: Fix strict aliasing rule violations in dtoa.c. (Closed)
Patch Set: Created 10 years, 4 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 | « no previous file | src/third_party/dtoa/dtoa.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform-posix.cc
diff --git a/src/platform-posix.cc b/src/platform-posix.cc
index 89f4d983df0a0388f47937c1f607d0de2866d40d..613e8e4051f79ca80a7804340a5d023aa7f02653 100644
--- a/src/platform-posix.cc
+++ b/src/platform-posix.cc
@@ -238,7 +238,7 @@ bool POSIXSocket::Bind(const int port) {
addr.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
addr.sin_port = htons(port);
int status = bind(socket_,
- reinterpret_cast<struct sockaddr *>(&addr),
+ BitCast<struct sockaddr *>(&addr),
sizeof(addr));
return status == 0;
}
« no previous file with comments | « no previous file | src/third_party/dtoa/dtoa.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698