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

Commit 73a7dde7 authored by songjinshi's avatar songjinshi
Browse files

[binder]: Correct the index for getReturnString



The cmd code can not as the index drectly.

Change-Id: Icddad46faef7a77acbd7edf118c081ac10501f47
Signed-off-by: default avatarsongjinshi <songjinshi@xiaomi.com>
parent 8c9cd8a2
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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