src/util/fdlist.c
/**
 * fdlist_steal() - steal FD
 * @list:               fdlist to operate on
 * @index:              index of FD
 *
 * This returns the FD at position @index and then drops it form the fdlist, by
 * replacing it with -1.
 *
 * If @index points outside the fdlist range, or if the FD was already stolen,
 * -1 is returned.
 *
 * Return: The FD at position @index is returned.
 */
steal FD
@list:               fdlist to operate on
@index:              index of FD

This returns the FD at position @index and then drops it form the fdlist, by
replacing it with -1.

If @index points outside the fdlist range, or if the FD was already stolen,
-1 is returned.

The FD at position @index is returned.
steal FD @list : fdlist to operate on @index : index of FD This returns the FD at position @index and then drops it form the fdlist by replacing it with - 1 . If @index points outside the fdlist range or if the FD was already stolen - 1 is returned . The FD at position @index is returned .
int fdlist_steal(FDList *list, size_t index) {
        int *p, fd = -1;
        p = fdlist_data(list);
        if (index < fdlist_count(list)) {
                fd = p[index];
                p[index] = -1;
        }
        return fd;
}
int fdlist_steal ( FDList * list , size_t index ) { int * p , fd = -1 ; p = fdlist_data ( list ) ; if ( index < fdlist_count ( list ) ) { fd = p [ index ] ; p [ index ] = -1 ; } return fd ; }
fdlist_steal() - steal FD
 @list:               fdlist to operate on
 @index:              index of FD
fdlist_steal () - steal FD @list : fdlist to operate on @index : index of FD