diff options
author | antirez <antirez@gmail.com> | 2013-12-25 18:24:04 +0100 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2013-12-25 18:24:04 +0100 |
commit | d07d4a876c1e2803e90b29ff1a9f4f53022772fc (patch) | |
tree | 77869e0b4be734001ab5a1e5bd5e4dda224cafe3 | |
parent | 9d1997706c6735c37afd2e67a2d315da54843c35 (diff) | |
download | redis-d07d4a876c1e2803e90b29ff1a9f4f53022772fc.tar.gz |
Remove useless goto from anetTcpGenericConnect().
-rw-r--r-- | src/anet.c | 4 |
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) { |