Chromium Code Reviews| Index: chrome/browser/crash_handler_host_linux.cc |
| diff --git a/chrome/browser/crash_handler_host_linux.cc b/chrome/browser/crash_handler_host_linux.cc |
| index 27ad89bd072fc85c9cd090a5fa7102bb4edcc173..517c3d45c98ee3df3d5e197cc75822b703d82170 100644 |
| --- a/chrome/browser/crash_handler_host_linux.cc |
| +++ b/chrome/browser/crash_handler_host_linux.cc |
| @@ -235,8 +235,10 @@ void CrashHandlerHostLinux::OnFileCanReadWithoutBlocking(int fd) { |
| (void) HANDLE_EINTR(close(reinterpret_cast<int*>(CMSG_DATA(hdr))[i])); |
| return; |
| } else { |
| - partner_fd = reinterpret_cast<int*>(CMSG_DATA(hdr))[0]; |
| - signal_fd = reinterpret_cast<int*>(CMSG_DATA(hdr))[1]; |
| + int fds[2] = { -1, -1 }; |
|
Mark Mentovai
2013/08/15 14:29:07
Don’t initialize, the memcpy follows immediately.
Paweł Hajdan Jr.
2013/08/19 20:09:37
Done.
|
| + memcpy(fds, CMSG_DATA(hdr), sizeof(fds)); |
| + partner_fd = fds[0]; |
| + signal_fd = fds[1]; |
| } |
| } else if (hdr->cmsg_type == SCM_CREDENTIALS) { |
| const struct ucred *cred = |