schannel: fix "empty expression statement has no effect"

Bug: 8ab78f720a (commitcomment-45445950)
Reported-by: Gisle Vanem
Closes #6381
This commit is contained in:
Daniel Stenberg 2020-12-27 11:05:15 +01:00
parent dc7bd62c67
commit 68dde8e330
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -1783,14 +1783,12 @@ schannel_recv(struct connectdata *conn, int sockindex,
infof(data, "schannel: server indicated shutdown in a prior call\n");
goto cleanup;
}
else if(!len) {
/* It's debatable what to return when !len. Regardless we can't return
immediately because there may be data to decrypt (in the case we want to
decrypt all encrypted cached data) so handle !len later in cleanup.
*/
; /* do nothing */
}
else if(!BACKEND->recv_connection_closed) {
/* It's debatable what to return when !len. Regardless we can't return
immediately because there may be data to decrypt (in the case we want to
decrypt all encrypted cached data) so handle !len later in cleanup.
*/
else if(len && !BACKEND->recv_connection_closed) {
/* increase enc buffer in order to fit the requested amount of data */
size = BACKEND->encdata_length - BACKEND->encdata_offset;
if(size < CURL_SCHANNEL_BUFFER_FREE_SIZE ||