From d2dfa3e68941c4dd6e7261d38bcf7fb5b889d275 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 4 May 2020 11:03:29 +0200 Subject: [PATCH] connect: add two asserts to clue code analyzers in a little --- lib/connect.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/connect.c b/lib/connect.c index 421f90415..b67d17722 100644 --- a/lib/connect.c +++ b/lib/connect.c @@ -1559,6 +1559,7 @@ void Curl_conncontrol(struct connectdata *conn, /* close if a connection, or a stream that isn't multiplexed */ bool closeit = (ctrl == CONNCTRL_CONNECTION) || ((ctrl == CONNCTRL_STREAM) && !(conn->handler->flags & PROTOPT_STREAM)); + DEBUGASSERT(conn); if((ctrl == CONNCTRL_STREAM) && (conn->handler->flags & PROTOPT_STREAM)) DEBUGF(infof(conn->data, "Kill stream: %s\n", reason)); @@ -1574,6 +1575,7 @@ void Curl_conncontrol(struct connectdata *conn, bool Curl_conn_data_pending(struct connectdata *conn, int sockindex) { int readable; + DEBUGASSERT(conn); if(Curl_ssl_data_pending(conn, sockindex) || Curl_recv_has_postponed_data(conn, sockindex))