diff options
| author | 2016-10-18 21:05:56 +0800 | |
|---|---|---|
| committer | 2016-10-21 09:20:30 +0800 | |
| commit | 73a7dde7c3e5c8437f396deeb200f250b3346be7 (patch) | |
| tree | 1b9cb82d706d8b679e0cab7b3f78670965daf26d | |
| parent | 8c9cd8a2158895d4bec9f7e6f980ef8f040cbae8 (diff) | |
[binder]: Correct the index for getReturnString
The cmd code can not as the index drectly.
Change-Id: Icddad46faef7a77acbd7edf118c081ac10501f47
Signed-off-by: songjinshi <songjinshi@xiaomi.com>
| -rw-r--r-- | libs/binder/IPCThreadState.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libs/binder/IPCThreadState.cpp b/libs/binder/IPCThreadState.cpp index 5d44d544b4..c9f688fcce 100644 --- a/libs/binder/IPCThreadState.cpp +++ b/libs/binder/IPCThreadState.cpp @@ -107,8 +107,9 @@ static const char *kCommandStrings[] = { "BC_DEAD_BINDER_DONE" }; -static const char* getReturnString(size_t idx) +static const char* getReturnString(uint32_t cmd) { + size_t idx = cmd & 0xff; if (idx < sizeof(kReturnStrings) / sizeof(kReturnStrings[0])) return kReturnStrings[idx]; else |