summaryrefslogtreecommitdiff
path: root/lib/vtls
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2020-12-27 11:05:15 +0100
committerDaniel Stenberg <daniel@haxx.se>2020-12-29 17:10:47 +0100
commit68dde8e330a2580c1af3f34cc1971716948c307b (patch)
tree5d797a9001ac3e2147b926e850ee16520b05c9e3 /lib/vtls
parentdc7bd62c67e47829194f09e287f43c61cdd3a9a8 (diff)
downloadcurl-68dde8e330a2580c1af3f34cc1971716948c307b.tar.gz
schannel: fix "empty expression statement has no effect"
Bug: https://github.com/curl/curl/commit/8ab78f720ae478d533e30b202baec4b451741579#commitcomment-45445950 Reported-by: Gisle Vanem Closes #6381
Diffstat (limited to 'lib/vtls')
-rw-r--r--lib/vtls/schannel.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/lib/vtls/schannel.c b/lib/vtls/schannel.c
index d7bc38917..8c195b0f4 100644
--- a/lib/vtls/schannel.c
+++ b/lib/vtls/schannel.c
@@ -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 ||