summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAnoop C S <anoopcs@redhat.com>2016-08-11 20:20:17 +0530
committerAndreas Schneider <asn@samba.org>2016-08-12 08:30:08 +0200
commit92788865b636237f761ebd57d02fad0f3c9e03cd (patch)
treea9033d4cc95ecdc8c5306ef16d54c5b5f2bee767 /src
parent69b89aa9d0847ba7238963c0dafef41d691c52cd (diff)
downloadsocket_wrapper-92788865b636237f761ebd57d02fad0f3c9e03cd.tar.gz
socket_wrapper-92788865b636237f761ebd57d02fad0f3c9e03cd.tar.xz
socket_wrapper-92788865b636237f761ebd57d02fad0f3c9e03cd.zip
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 <obnox@samba.org> Signed-off-by: Anoop C S <anoopcs@redhat.com> Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'src')
-rw-r--r--src/socket_wrapper.c5
1 files changed, 1 insertions, 4 deletions
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) {