Skip to content

Commit

Permalink
Merge pull request #20362 from Enoch247/use-ipv4-init-macro
Browse files Browse the repository at this point in the history
treewide: make use of new IPv4 static init macro
  • Loading branch information
benpicco authored Feb 8, 2024
2 parents 26946a7 + c3a4beb commit 942b798
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions sys/include/net/dns_mock.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion tests/net/netutils/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 942b798

Please sign in to comment.