adb: fdevent fixes

* fdevent_{set,add,del}()

  * CHECK() that the fdevent is FDE_ACTIVE, otherwise the caller would
    be waiting for events that will never arrive.

  * Remove ~ from "fde->events &= ~events" to keep desired bits instead
    of turning off desired bits.

* fdevent_call_fdfunc()

  * CHECK(FDE_PENDING) since it should always be true if the fdevent was
    on the pending list, or if fdevent_subproc_event_func() is faking
    things. The goal is to try to avoid losing events.

Change-Id: I979c2fffa0b3d6b635488cde11dc544691193018
Signed-off-by: Spencer Low <CompareAndSwap@gmail.com>
1 file changed