build: replace assert() with DEBUGASSERT(), where missing

Follow-up to 9a2663322c #17572
Follow-up to c96f982166 #10451

Closes #22521
This commit is contained in:
Viktor Szakats 2026-08-09 11:07:27 +02:00
parent 8c525c081d
commit 791b6883ed
No known key found for this signature in database
2 changed files with 4 additions and 4 deletions

View file

@ -283,7 +283,7 @@ static CURLcode do_sendmsg(struct Curl_cfilter *cf,
* does not seem to like a msg_control of length 0. */
memset(msg_ctrl, 0, sizeof(msg_ctrl));
msg.msg_control = msg_ctrl;
assert(sizeof(msg_ctrl) >= CMSG_SPACE(sizeof(int)));
DEBUGASSERT(sizeof(msg_ctrl) >= CMSG_SPACE(sizeof(int)));
msg.msg_controllen = CMSG_SPACE(sizeof(int));
cm = CMSG_FIRSTHDR(&msg);
cm->cmsg_level = SOL_UDP;

View file

@ -799,10 +799,10 @@ curl_socket_t win32_stdin_read_thread(void)
static curl_socket_t socket_r = CURL_SOCKET_BAD;
if(socket_r != CURL_SOCKET_BAD) {
assert(stdin_thread);
DEBUGASSERT(stdin_thread);
return socket_r;
}
assert(!stdin_thread);
DEBUGASSERT(!stdin_thread);
do {
curl_socklen_t socksize = 0;
@ -944,7 +944,7 @@ err:
return CURL_SOCKET_BAD;
}
assert(socket_r != CURL_SOCKET_BAD);
DEBUGASSERT(socket_r != CURL_SOCKET_BAD);
return socket_r;
}
#endif /* USE_WINSOCK */