lib: add a few DEBUGASSERT(data) to aid code analyzers
... where 'data' is assumed to always work. Closes #14033
This commit is contained in:
Родитель
ffe193c991
Коммит
9a49af5fd8
|
@ -662,6 +662,7 @@ static void connc_discard_conn(struct conncache *connc,
|
|||
struct Curl_easy *data = last_data? last_data : connc->closure_handle;
|
||||
bool done = FALSE;
|
||||
|
||||
DEBUGASSERT(data);
|
||||
DEBUGASSERT(connc);
|
||||
DEBUGASSERT(!conn->bundle);
|
||||
|
||||
|
@ -906,6 +907,7 @@ static void connc_perform(struct conncache *connc)
|
|||
if(!e)
|
||||
return;
|
||||
|
||||
DEBUGASSERT(data);
|
||||
DEBUGASSERT(!connc->shutdowns.iter_locked);
|
||||
DEBUGF(infof(data, "[CCACHE] perform, %zu connections being shutdown",
|
||||
Curl_llist_count(&connc->shutdowns.conn_list)));
|
||||
|
|
|
@ -1010,8 +1010,9 @@ void Curl_detach_connection(struct Curl_easy *data)
|
|||
* This is the only function that should assign data->conn
|
||||
*/
|
||||
void Curl_attach_connection(struct Curl_easy *data,
|
||||
struct connectdata *conn)
|
||||
struct connectdata *conn)
|
||||
{
|
||||
DEBUGASSERT(data);
|
||||
DEBUGASSERT(!data->conn);
|
||||
DEBUGASSERT(conn);
|
||||
data->conn = conn;
|
||||
|
|
Загрузка…
Ссылка в новой задаче