Changed remove_fd function to void return