Skip to content

Commit

Permalink
Fix netsocket DNS test for IAR
Browse files Browse the repository at this point in the history
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'.
  • Loading branch information
Teppo Järvelin committed Aug 12, 2019
1 parent 9bf85ef commit ce36104
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion TESTS/netsocket/dns/main.cpp
Expand Up @@ -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()
Expand Down

0 comments on commit ce36104

Please sign in to comment.