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

Commit 358a2bbe authored by Greg Kaiser's avatar Greg Kaiser
Browse files

Remove never-reached 'return' statements

We style Nfc::open() to be similar to Nfc::close(), allowing us to
remove two never-reached 'return' statements, and help avoid
potential confusion with future readers of the code.

Test: TreeHugger
Bug: 204868826
Change-Id: Ieabdfbb95540cafaf00a16955f26344c92d2d482
parent 4af9762e
Loading
Loading
Loading
Loading
+14 −17
Original line number Original line Diff line number Diff line
@@ -42,7 +42,7 @@ void OnDeath(void* cookie) {
        LOG(INFO) << "Nfc::open null callback";
        LOG(INFO) << "Nfc::open null callback";
        return ndk::ScopedAStatus::fromServiceSpecificError(
        return ndk::ScopedAStatus::fromServiceSpecificError(
                static_cast<int32_t>(NfcStatus::FAILED));
                static_cast<int32_t>(NfcStatus::FAILED));
    } else {
    }
    Nfc::mCallback = clientCallback;
    Nfc::mCallback = clientCallback;


    clientDeathRecipient = AIBinder_DeathRecipient_new(OnDeath);
    clientDeathRecipient = AIBinder_DeathRecipient_new(OnDeath);
@@ -57,9 +57,6 @@ void OnDeath(void* cookie) {
    return ret == 0 ? ndk::ScopedAStatus::ok()
    return ret == 0 ? ndk::ScopedAStatus::ok()
                    : ndk::ScopedAStatus::fromServiceSpecificError(
                    : ndk::ScopedAStatus::fromServiceSpecificError(
                              static_cast<int32_t>(NfcStatus::FAILED));
                              static_cast<int32_t>(NfcStatus::FAILED));
        return ndk::ScopedAStatus::ok();
    }
    return ndk::ScopedAStatus::ok();
}
}


::ndk::ScopedAStatus Nfc::close(NfcCloseType type) {
::ndk::ScopedAStatus Nfc::close(NfcCloseType type) {