From ce36104ab33ad266109e0ef1faf25f9d0df4352c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Teppo=20J=C3=A4rvelin?= Date: Mon, 12 Aug 2019 09:39:41 +0300 Subject: [PATCH] Fix netsocket DNS test for IAR Test case printed IP address. If ip address is null, IAR compiled binary fails. Added check for printing null. If IP address is null, then it prints string 'null'. --- TESTS/netsocket/dns/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TESTS/netsocket/dns/main.cpp b/TESTS/netsocket/dns/main.cpp index 8761b1f7efa..ae2e3f5b820 100644 --- a/TESTS/netsocket/dns/main.cpp +++ b/TESTS/netsocket/dns/main.cpp @@ -160,7 +160,7 @@ static void net_bringup() net = NetworkInterface::get_default_instance(); nsapi_error_t err = net->connect(); TEST_ASSERT_EQUAL(NSAPI_ERROR_OK, err); - printf("MBED: IP address is '%s'\n", net->get_ip_address()); + printf("MBED: IP address is '%s'\n", net->get_ip_address() ? net->get_ip_address() : "null"); } static void net_bringdown()