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

am: 31f2c81755

Change-Id: If4ad61346df17727e39bf0aa26c4dc96f8feeb24
This commit is contained in:
Jaesung Chung 2017-06-19 00:18:23 +00:00 committed by android-build-merger
commit b9a1ff14ae
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