summaryrefslogtreecommitdiff
path: root/src/anet.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/anet.c')
-rw-r--r--src/anet.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/anet.c b/src/anet.c
index 45b31e785..75bebf7b1 100644
--- a/src/anet.c
+++ b/src/anet.c
@@ -255,10 +255,8 @@ static int anetTcpGenericConnect(char *err, char *addr, int port, int flags)
* have a connected socket. Let's return to the caller. */
goto end;
}
- if (p == NULL) {
+ if (p == NULL)
anetSetError(err, "creating socket: %s", strerror(errno));
- goto error;
- }
error:
if (s != ANET_ERR) {