Fix the arguments to memcpy.

Change-Id: Ieaee26f46f43a9d412537047566178985370198b
This commit is contained in:
Aravind Akella 2015-05-08 15:59:23 -07:00
parent d9c4971da2
commit 08f04bf36c
1 changed files with 1 additions and 1 deletions

View File

@ -1680,7 +1680,7 @@ int SensorService::SensorEventConnection::handleEvent(int fd, int events, void*
#endif
} else if (numBytesRead == sizeof(uint32_t)) {
uint32_t numAcks = 0;
memcpy(&numAcks, buf, sizeof(numBytesRead));
memcpy(&numAcks, buf, numBytesRead);
// Sanity check to ensure there are no read errors in recv, numAcks is always
// within the range and not zero. If any of the above don't hold reset
// mWakeLockRefCount to zero.