recvfrom takes a non-const pointer.

Change-Id: Ib2c8f2710cb333904106f849f492c83697fdd937
This commit is contained in:
Elliott Hughes
2016-08-12 10:53:48 -07:00
parent 76ce8e5242
commit 2fa54ef232

View File

@@ -615,12 +615,11 @@ bool CommonTimeServer::handlePacket() {
ssize_t recvBytes = recvfrom(
mSocket, buf, sizeof(buf), 0,
reinterpret_cast<const sockaddr *>(&srcAddr), &srcAddrLen);
reinterpret_cast<sockaddr *>(&srcAddr), &srcAddrLen);
if (recvBytes < 0) {
mBadPktLog.log(ANDROID_LOG_ERROR, LOG_TAG,
"recvfrom failed (res %d, errno %d)",
recvBytes, errno);
mBadPktLog.log(ANDROID_LOG_ERROR, LOG_TAG, "recvfrom failed (%s)",
strerror(errno));
return false;
}