Merge "Merge "Merge "Fix misc-macro-parentheses warnings in common_time." am: c49d21f9c4 am: ba11b8e441" into nyc-dev-plus-aosp am: e60c649ada" into nyc-mr1-dev-plus-aosp
This commit is contained in:
committed by
Android (Google) Code Review
commit
ce685d90a5
@@ -285,7 +285,7 @@ void CommonTimeServer::reevaluateAutoDisableState(bool commonClockHasClients) {
|
|||||||
if (res > 0) \
|
if (res > 0) \
|
||||||
write(fd, buffer, res); \
|
write(fd, buffer, res); \
|
||||||
} while (0)
|
} while (0)
|
||||||
#define checked_percentage(a, b) ((0 == b) ? 0.0f : ((100.0f * a) / b))
|
#define checked_percentage(a, b) ((0 == (b)) ? 0.0f : ((100.0f * (a)) / (b)))
|
||||||
|
|
||||||
status_t CommonTimeServer::dumpClockInterface(int fd,
|
status_t CommonTimeServer::dumpClockInterface(int fd,
|
||||||
const Vector<String16>& /* args */,
|
const Vector<String16>& /* args */,
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ const uint16_t TimeServicePacketHeader::kCurVersion = 1;
|
|||||||
do { \
|
do { \
|
||||||
if ((offset + sizeof(field_name)) > length) \
|
if ((offset + sizeof(field_name)) > length) \
|
||||||
return -1; \
|
return -1; \
|
||||||
field_name = converter(*((type*)(data + offset))); \
|
(field_name) = converter(*((type*)(data + offset))); \
|
||||||
offset += sizeof(field_name); \
|
offset += sizeof(field_name); \
|
||||||
} while (0)
|
} while (0)
|
||||||
#define DESERIALIZE_INT16(field_name) DESERIALIZE_FIELD(field_name, int16_t, ntohs)
|
#define DESERIALIZE_INT16(field_name) DESERIALIZE_FIELD(field_name, int16_t, ntohs)
|
||||||
|
|||||||
Reference in New Issue
Block a user