summaryrefslogtreecommitdiff
path: root/bufferevent_openssl.c
diff options
context:
space:
mode:
authorDominic Chen <d.c.ddcc@gmail.com>2017-04-13 14:58:13 -0400
committerDominic Chen <d.c.ddcc@gmail.com>2017-04-13 16:13:11 -0400
commit92cc0b9c3db38088f79c5d1e432c429fbc366968 (patch)
treecb4895fbd139603f1573a281a8ca4a9755f238fa /bufferevent_openssl.c
parent266f43af7798befa3d27bfabaa9ae699259c3924 (diff)
downloadlibevent-92cc0b9c3db38088f79c5d1e432c429fbc366968.tar.gz
bufferevent: refactor to use type check macros
Diffstat (limited to 'bufferevent_openssl.c')
-rw-r--r--bufferevent_openssl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/bufferevent_openssl.c b/bufferevent_openssl.c
index da3963af..252627ec 100644
--- a/bufferevent_openssl.c
+++ b/bufferevent_openssl.c
@@ -354,11 +354,11 @@ static inline struct bufferevent_openssl *
upcast(struct bufferevent *bev)
{
struct bufferevent_openssl *bev_o;
- if (bev->be_ops != &bufferevent_ops_openssl)
+ if (!BEV_IS_OPENSSL(bev))
return NULL;
bev_o = (void*)( ((char*)bev) -
evutil_offsetof(struct bufferevent_openssl, bev.bev));
- EVUTIL_ASSERT(bev_o->bev.bev.be_ops == &bufferevent_ops_openssl);
+ EVUTIL_ASSERT(BEV_IS_OPENSSL(&bev_o->bev.bev));
return bev_o;
}
@@ -803,7 +803,7 @@ consider_reading(struct bufferevent_openssl *bev_ssl)
if (bev_ssl->bev.read_suspended)
break;
-
+
/* Read all pending data. This won't hit the network
* again, and will (most importantly) put us in a state
* where we don't need to read anything else until the