From 2fa54ef232ef7bb267e5fa53bf556d19564f4c32 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Fri, 12 Aug 2016 10:53:48 -0700 Subject: [PATCH] recvfrom takes a non-const pointer. Change-Id: Ib2c8f2710cb333904106f849f492c83697fdd937 --- libs/common_time/common_time_server.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/libs/common_time/common_time_server.cpp b/libs/common_time/common_time_server.cpp index f72ffaa637120..b1495effbc81c 100644 --- a/libs/common_time/common_time_server.cpp +++ b/libs/common_time/common_time_server.cpp @@ -615,12 +615,11 @@ bool CommonTimeServer::handlePacket() { ssize_t recvBytes = recvfrom( mSocket, buf, sizeof(buf), 0, - reinterpret_cast(&srcAddr), &srcAddrLen); + reinterpret_cast(&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; }