1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

treewide: make use of new IPv4 static init macro

This commit makes use of the newly added static initializer for IPv4
addresses.
This commit is contained in:
Joshua DeWeese 2024-02-08 10:12:22 -05:00
parent c0f233dd2f
commit c3a4beb200
2 changed files with 3 additions and 3 deletions

View File

@ -34,9 +34,9 @@ extern "C" {
/**
* @brief IPv4 address for @ref SOCK_DNS_MOCK_EXAMPLE_COM_HOSTNAME.
* Address represents "93.184.216.34".
*/
static const ipv4_addr_t sock_dns_mock_example_com_addr_ipv4 = { { 0x5d, 0xb8, 0xd8, 0x22 } };
static const ipv4_addr_t sock_dns_mock_example_com_addr_ipv4 =
IPV4_ADDR_INIT(93, 184, 216, 34);
/**
* @brief IPv6 address for @ref SOCK_DNS_MOCK_EXAMPLE_COM_HOSTNAME.

View File

@ -151,7 +151,7 @@ static void test_ipv4_addr_from_str__address_NULL(void)
static void test_ipv4_addr_from_str__success(void)
{
static const ipv4_addr_t a = { { 0x01, 0x02, 0x03, 0x04 } };
static const ipv4_addr_t a = IPV4_ADDR_INIT(1, 2, 3, 4);
ipv4_addr_t address;
TEST_ASSERT_EQUAL_INT(netutils_get_ipv4(&address, "1.2.3.4"), 0);