static void gpollfds_from_select(void)

{

    int fd;

    for (fd = 0; fd <= nfds; fd++) {

        int events = 0;

        if (FD_ISSET(fd, &rfds)) {

            events |= G_IO_IN | G_IO_HUP | G_IO_ERR;

        }

        if (FD_ISSET(fd, &wfds)) {

            events |= G_IO_OUT | G_IO_ERR;

        }

        if (FD_ISSET(fd, &xfds)) {

            events |= G_IO_PRI;

        }

        if (events) {

            GPollFD pfd = {

                .fd = fd,

                .events = events,

            };

            g_array_append_val(gpollfds, pfd);

        }

    }

}

static void gpollfds_from_select(void)

{

    int fd;

    for (fd = 0; fd <= nfds; fd++) {

        int events = 0;

        if (FD_ISSET(fd, &rfds)) {

            events |= G_IO_IN | G_IO_HUP | G_IO_ERR;

        }

        if (FD_ISSET(fd, &wfds)) {

            events |= G_IO_OUT | G_IO_ERR;

        }

        if (FD_ISSET(fd, &xfds)) {

            events |= G_IO_PRI;

        }

        if (events) {

            GPollFD pfd = {

                .fd = fd,

                .events = events,

            };

            g_array_append_val(gpollfds, pfd);

        }

    }

}

static void FUNC_0(void)

{

    int VAR_0;

    for (VAR_0 = 0; VAR_0 <= nfds; VAR_0++) {

        int events = 0;

        if (FD_ISSET(VAR_0, &rfds)) {

            events |= G_IO_IN | G_IO_HUP | G_IO_ERR;

        }

        if (FD_ISSET(VAR_0, &wfds)) {

            events |= G_IO_OUT | G_IO_ERR;

        }

        if (FD_ISSET(VAR_0, &xfds)) {

            events |= G_IO_PRI;

        }

        if (events) {

            GPollFD pfd = {

                .VAR_0 = VAR_0,

                .events = events,

            };

            g_array_append_val(gpollfds, pfd);

        }

    }

}

static void FUNC_0(void)
{ int VAR_0; for (VAR_0 = 0; VAR_0 <= nfds; VAR_0++) { int events = 0; if (FD_ISSET(VAR_0, &rfds)) { events |= G_IO_IN | G_IO_HUP | G_IO_ERR; } if (FD_ISSET(VAR_0, &wfds)) { events |= G_IO_OUT | G_IO_ERR; } if (FD_ISSET(VAR_0, &xfds)) { events |= G_IO_PRI; } if (events) { GPollFD pfd = { .VAR_0 = VAR_0,
.events = events,
}; g_array_append_val(gpollfds, pfd); } } }