Merge "Use sizeof(android_log_header_t) instead of sizeof its components"
am: 8facba4326
Change-Id: Ia7655b2d082c1b55fa2e0a98245e49d2b0326dbc
This commit is contained in:
@@ -56,8 +56,7 @@ bool StatsSocketListener::onDataAvailable(SocketClient* cli) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// + 1 to ensure null terminator if MAX_PAYLOAD buffer is received
|
// + 1 to ensure null terminator if MAX_PAYLOAD buffer is received
|
||||||
char buffer[sizeof_log_id_t + sizeof(uint16_t) + sizeof(log_time) + LOGGER_ENTRY_MAX_PAYLOAD +
|
char buffer[sizeof(android_log_header_t) + LOGGER_ENTRY_MAX_PAYLOAD + 1];
|
||||||
1];
|
|
||||||
struct iovec iov = {buffer, sizeof(buffer) - 1};
|
struct iovec iov = {buffer, sizeof(buffer) - 1};
|
||||||
|
|
||||||
alignas(4) char control[CMSG_SPACE(sizeof(struct ucred))];
|
alignas(4) char control[CMSG_SPACE(sizeof(struct ucred))];
|
||||||
|
|||||||
Reference in New Issue
Block a user