lib: add a few DEBUGASSERT(data) to aid code analyzers

... where 'data' is assumed to always work.

Closes #14033
This commit is contained in:
Daniel Stenberg 2024-06-27 08:45:06 +02:00
parent ffe193c991
commit 9a49af5fd8
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
2 changed files with 4 additions and 1 deletions

View file

@ -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;