Merge "logd-unit-tests: make sure use unsigned types when reading le" am: 31f2c81755

am: b9a1ff14ae

Change-Id: I2a780305fca0143ec863d1736d6ff74ff222eef2
This commit is contained in:
Jaesung Chung 2017-06-19 00:23:19 +00:00 committed by android-build-merger
commit fe361ae7b3
1 changed files with 6 additions and 2 deletions

View File

@ -933,8 +933,12 @@ TEST(logd, getEventTag_newentry) {
}
#ifdef __ANDROID__
static inline int32_t get4LE(const char* src) {
return src[0] | (src[1] << 8) | (src[2] << 16) | (src[3] << 24);
static inline uint32_t get4LE(const uint8_t* src) {
return src[0] | (src[1] << 8) | (src[2] << 16) | (src[3] << 24);
}
static inline uint32_t get4LE(const char* src) {
return get4LE(reinterpret_cast<const uint8_t*>(src));
}
#endif