libcutils/selector.c
static inline bool maybeAdd(SelectableFd* selectableFd,
        void (*callback)(SelectableFd*), fd_set* fdSet) {
    if (callback != NULL) {
        FD_SET(selectableFd->fd, fdSet);
        return true;
    }
    return false;
}
/**
 * Adds an fd to the given set if the callback is non-null. Returns true
 * if the fd was added.
 */
Adds an fd to the given set if the callback is non-null. Returns true
if the fd was added.
Adds an fd to the given set if the callback is non - null . Returns true if the fd was added .
static inline bool maybeAdd(SelectableFd* selectableFd,
        void (*callback)(SelectableFd*), fd_set* fdSet) {
    if (callback != NULL) {
        FD_SET(selectableFd->fd, fdSet);
        return true;
    }
    return false;
}
static inline bool maybeAdd ( SelectableFd * selectableFd , void ( * callback ) ( SelectableFd * ) , fd_set * fdSet ) { if ( callback != NULL ) { FD_SET ( selectableFd -> fd , fdSet ) ; return true ; } return false ; }
Adds an fd to the given set if the callback is non-null.
Adds an fd to the given set if the callback is non - null .