summaryrefslogtreecommitdiff
path: root/libcutils/sockets_unix.cpp
diff options
context:
space:
mode:
authorStephen Hines <srhines@google.com>2016-12-07 03:46:10 -0800
committerStephen Hines <srhines@google.com>2016-12-07 03:46:55 -0800
commitb0775ca51739747be074a4b933d52da933830ed5 (patch)
tree133068fb814cce23716f5a6c3166835669421cfd /libcutils/sockets_unix.cpp
parenta79477559213e25c6a1f4bf29fc1f4a2e741f8df (diff)
Switch to memcpy for accessing misaligned data.
Bug: http://b/31532493 Using misaligned pointers forces us to potentially take the address of members in a packed structure (which is now a warning/error in the latest Clang). Using memcpy() is the proper way to handle this kind of problem, as the compiler can insert the proper instructions (and usually elide the memcpy() entirely). Test: Built correctly with updated compilers. Change-Id: Ia1f6eb62cf19404ff76b71d3c6c7ffffa1403120
Diffstat (limited to 'libcutils/sockets_unix.cpp')
0 files changed, 0 insertions, 0 deletions