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

Commit ddaccb76 authored by Devin Moore's avatar Devin Moore
Browse files

Make invalid FD a fatal error in FdTrigger

The FD should always be valid at this point.

Test: m && launch_cvd
Bug: none
Change-Id: I47fe10d5e1b3dd0d035feed8f7551061ae68c0c4
parent 07889b16
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -108,7 +108,7 @@ status_t FdTrigger::triggerablePoll(const android::RpcTransportFd& transportFd,


    // POLLNVAL: invalid FD number, e.g. not opened.
    // POLLNVAL: invalid FD number, e.g. not opened.
    if (pfd[0].revents & POLLNVAL) {
    if (pfd[0].revents & POLLNVAL) {
        ALOGE("Invalid FD number (%d) in FdTrigger (POLLNVAL)", pfd[0].fd);
        LOG_ALWAYS_FATAL("Invalid FD number (%d) in FdTrigger (POLLNVAL)", pfd[0].fd);
        return BAD_VALUE;
        return BAD_VALUE;
    }
    }