summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2013-12-25 18:24:04 +0100
committerantirez <antirez@gmail.com>2013-12-25 18:24:04 +0100
commitd07d4a876c1e2803e90b29ff1a9f4f53022772fc (patch)
tree77869e0b4be734001ab5a1e5bd5e4dda224cafe3
parent9d1997706c6735c37afd2e67a2d315da54843c35 (diff)
downloadredis-d07d4a876c1e2803e90b29ff1a9f4f53022772fc.tar.gz
Remove useless goto from anetTcpGenericConnect().
-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) {