1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-24 22:13:52 +01:00

Merge pull request #20362 from Enoch247/use-ipv4-init-macro

treewide: make use of new IPv4 static init macro
This commit is contained in:
benpicco 2024-02-08 20:23:10 +00:00 committed by GitHub
commit 942b798073
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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);