Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c5f477dd authored by Tom Cherry's avatar Tom Cherry Committed by android-build-merger
Browse files

Merge "Use sizeof(android_log_header_t) instead of sizeof its components" am: 8facba43

am: 7b1e0eee

Change-Id: I3839fe3d554c1599587e73d12e43a085a6712e2c
parents 67c45a81 7b1e0eee
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -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))];