From b7caa5448fa608f9b707a7ee786537f7848954e8 Mon Sep 17 00:00:00 2001 From: jeromecoutant Date: Tue, 20 Sep 2016 09:40:48 +0200 Subject: [PATCH] tcp_client_hello_worldminor update --- .../TESTS/mbedmicro-net/tcp_client_hello_world/main.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/features/net/FEATURE_IPV4/TESTS/mbedmicro-net/tcp_client_hello_world/main.cpp b/features/net/FEATURE_IPV4/TESTS/mbedmicro-net/tcp_client_hello_world/main.cpp index 2ff27828c2..5cd12a563b 100644 --- a/features/net/FEATURE_IPV4/TESTS/mbedmicro-net/tcp_client_hello_world/main.cpp +++ b/features/net/FEATURE_IPV4/TESTS/mbedmicro-net/tcp_client_hello_world/main.cpp @@ -67,16 +67,14 @@ int main() { TEST_ASSERT_TRUE(found_200_ok); TEST_ASSERT_TRUE(found_hello); - result = true; - if (!found_200_ok) result = false; - if (!found_hello) result = false; + if (found_200_ok && found_hello) result = true; printf("HTTP: Received %d chars from server\r\n", ret); printf("HTTP: Received 200 OK status ... %s\r\n", found_200_ok ? "[OK]" : "[FAIL]"); printf("HTTP: Received '%s' status ... %s\r\n", HTTP_HELLO_STR, found_hello ? "[OK]" : "[FAIL]"); printf("HTTP: Received message:\r\n"); printf("%s", buffer); - sock.close(); + sock.close(); } else { printf("HTTP: ERROR\r\n");