mirror of
https://github.com/curl/curl.git
synced 2026-07-26 01:27:15 +03:00
checksrc: find bad indentation in conditions without open brace
If the previous line starts with if/while/for AND ends with a closed parenthesis and there's an equal number of open and closed parentheses on that line, verify that this line is indented $indent more steps, if not a cpp line. Also adjust the fall-out from this fix. Closes #11054
This commit is contained in:
parent
31303c34e9
commit
9ce7eee070
17 changed files with 49 additions and 23 deletions
|
|
@ -241,7 +241,7 @@ void Curl_sock_assign_addr(struct Curl_sockaddr_ex *dest,
|
|||
dest->addrlen = ai->ai_addrlen;
|
||||
|
||||
if(dest->addrlen > sizeof(struct Curl_sockaddr_storage))
|
||||
dest->addrlen = sizeof(struct Curl_sockaddr_storage);
|
||||
dest->addrlen = sizeof(struct Curl_sockaddr_storage);
|
||||
memcpy(&dest->sa_addr, ai->ai_addr, dest->addrlen);
|
||||
}
|
||||
|
||||
|
|
@ -1222,7 +1222,7 @@ static bool cf_socket_data_pending(struct Curl_cfilter *cf,
|
|||
|
||||
(void)data;
|
||||
if(!Curl_bufq_is_empty(&ctx->recvbuf))
|
||||
return TRUE;
|
||||
return TRUE;
|
||||
|
||||
readable = SOCKET_READABLE(ctx->sock, 0);
|
||||
return (readable > 0 && (readable & CURL_CSELECT_IN));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue