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'.
pull/11199/head
Teppo Järvelin 2019-08-12 09:39:41 +03:00
parent 9bf85ef67e
commit ce36104ab3
1 changed files with 1 additions and 1 deletions

View File

@ -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()