diff --git a/logd/SerializedLogChunkTest.cpp b/logd/SerializedLogChunkTest.cpp index 3b451252d..862c3fe31 100644 --- a/logd/SerializedLogChunkTest.cpp +++ b/logd/SerializedLogChunkTest.cpp @@ -99,13 +99,9 @@ TEST(SerializedLogChunk, three_logs) { "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF" // Timestamp "\x0C\x00last message"; // msg_len + message - for (size_t i = 0; i < chunk_size; ++i) { - if (i < sizeof(expected_buffer_data)) { - EXPECT_EQ(static_cast(expected_buffer_data[i]), chunk.data()[i]) - << "position: " << i; - } else { - EXPECT_EQ(0, chunk.data()[i]) << "position: " << i; - } + for (size_t i = 0; i < sizeof(expected_buffer_data); ++i) { + EXPECT_EQ(static_cast(expected_buffer_data[i]), chunk.data()[i]) + << "position: " << i; } }