From a10a6f4ed918ea1432820d99e9373f37f906d6f0 Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Mon, 14 Aug 2017 23:11:53 +0300 Subject: [PATCH] Remove check against passed bufferevent in bufferevent_socket_connect() It is a bit confusing to check against the result of EVUTIL_UPCAST(), because it can return not NULL for NULL pointers, but for even though with bufferevent we are fine (because bufferevent is the first field in bufferevent_private), there are no checks for "bufev" in bufferevent's API, so just remove it to make it generic. Fixes: #542 Signed-off-by: Ivan Maidanski Signed-off-by: Azat Khuzhin --- bufferevent_sock.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/bufferevent_sock.c b/bufferevent_sock.c index e305ec55..38f791ee 100644 --- a/bufferevent_sock.c +++ b/bufferevent_sock.c @@ -389,9 +389,6 @@ bufferevent_socket_connect(struct bufferevent *bev, bufferevent_incref_and_lock_(bev); - if (!bufev_p) - goto done; - fd = bufferevent_getfd(bev); if (fd < 0) { if (!sa)