From 548f4d062b06e2cff7fadb0d1ee7de34c1223a8a Mon Sep 17 00:00:00 2001 From: Anoop C S Date: Tue, 29 Aug 2017 14:29:16 +0530 Subject: swrap: Remove swrap_first_free_index swrap_first_free_index is no longer used as the whole logic now implemented within swrap_create_socket. Signed-off-by: Anoop C S Reviewed-by: Michael Adam Reviewed-by: Andreas Schneider --- src/socket_wrapper.c | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/src/socket_wrapper.c b/src/socket_wrapper.c index 243a938..ad83111 100644 --- a/src/socket_wrapper.c +++ b/src/socket_wrapper.c @@ -1374,28 +1374,6 @@ static unsigned int socket_wrapper_default_iface(void) return 1;/* 127.0.0.1 */ } -/* - * Return the first free entry (if any) and make - * it re-usable again (by nulling it out) - */ -static int socket_wrapper_first_free_index(void) -{ - struct socket_info *si = NULL; - int next_free; - - if (first_free == -1) { - errno = ENFILE; - return -1; - } - - si = swrap_get_socket_info(first_free); - next_free = swrap_get_next_free(si); - ZERO_STRUCTP(si); - swrap_set_next_free(si, next_free); - - return first_free; -} - static int swrap_add_socket_info(struct socket_info *si_input) { struct socket_info *si = NULL; -- cgit