Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

treewide: make use of new IPv4 static init macro #20362

Merged
merged 1 commit into from
Feb 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -97,7 +97,7 @@
ipv6_addr_t address;
netif_t *netif;

TEST_ASSERT_EQUAL_INT(netutils_get_ipv6(&address, &netif, "fe80::f8f9:fafb:fcfd:feff%3"), -EINVAL);

Check warning on line 100 in tests/net/netutils/main.c

View workflow job for this annotation

GitHub Actions / static-tests

line is longer than 100 characters
}

static void test_ipv6_addr_from_str__success4(void)
Expand All @@ -105,7 +105,7 @@
ipv6_addr_t address;
netif_t *netif;

TEST_ASSERT_EQUAL_INT(netutils_get_ipv6(&address, &netif, SOCK_DNS_MOCK_EXAMPLE_COM_HOSTNAME), 0);

Check warning on line 108 in tests/net/netutils/main.c

View workflow job for this annotation

GitHub Actions / static-tests

line is longer than 100 characters
TEST_ASSERT(ipv6_addr_equal(&sock_dns_mock_example_com_addr_ipv6, &address));
}

Expand Down Expand Up @@ -151,7 +151,7 @@

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
Loading