From 92788865b636237f761ebd57d02fad0f3c9e03cd Mon Sep 17 00:00:00 2001 From: Anoop C S Date: Thu, 11 Aug 2016 20:20:17 +0530 Subject: swrap: Remove redunant check in swrap_socket The very same check is also being made inside swrap_remove_stale(). So we can get rid of this early if condition. Pair-programmed-with: Michael Adam Signed-off-by: Anoop C S Signed-off-by: Michael Adam Reviewed-by: Andreas Schneider --- src/socket_wrapper.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src') diff --git a/src/socket_wrapper.c b/src/socket_wrapper.c index e944a3b..b11e4a9 100644 --- a/src/socket_wrapper.c +++ b/src/socket_wrapper.c @@ -2458,10 +2458,7 @@ static int swrap_socket(int family, int type, int protocol) } /* Check if we have a stale fd and remove it */ - si = find_socket_info(fd); - if (si != NULL) { - swrap_remove_stale(fd); - } + swrap_remove_stale(fd); si = (struct socket_info *)calloc(1, sizeof(struct socket_info)); if (si == NULL) { -- cgit