From a106ebd1f185daa7f7198a50caa3734bd8961fcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCnter=20Obiltschnig?= Date: Sat, 16 Nov 2024 20:06:59 +0100 Subject: [PATCH] fix(tests): CodeQL warnings --- NetSSL_OpenSSL/testsuite/src/SecureStreamSocketTest.cpp | 4 ++-- NetSSL_Win/testsuite/src/SecureStreamSocketTest.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/NetSSL_OpenSSL/testsuite/src/SecureStreamSocketTest.cpp b/NetSSL_OpenSSL/testsuite/src/SecureStreamSocketTest.cpp index bf4a6a9b1..b252a7276 100644 --- a/NetSSL_OpenSSL/testsuite/src/SecureStreamSocketTest.cpp +++ b/NetSSL_OpenSSL/testsuite/src/SecureStreamSocketTest.cpp @@ -113,7 +113,7 @@ void SecureStreamSocketTest::testSendReceive() { received.append(buffer, rc); } - else if (n == 0) + else if (rc == 0) { break; } @@ -188,7 +188,7 @@ void SecureStreamSocketTest::testNB() { received.append(buffer, rc); } - else if (n == 0) + else if (rc == 0) { break; } diff --git a/NetSSL_Win/testsuite/src/SecureStreamSocketTest.cpp b/NetSSL_Win/testsuite/src/SecureStreamSocketTest.cpp index bf4a6a9b1..b252a7276 100644 --- a/NetSSL_Win/testsuite/src/SecureStreamSocketTest.cpp +++ b/NetSSL_Win/testsuite/src/SecureStreamSocketTest.cpp @@ -113,7 +113,7 @@ void SecureStreamSocketTest::testSendReceive() { received.append(buffer, rc); } - else if (n == 0) + else if (rc == 0) { break; } @@ -188,7 +188,7 @@ void SecureStreamSocketTest::testNB() { received.append(buffer, rc); } - else if (n == 0) + else if (rc == 0) { break; }