Skip to content

Commit

Permalink
directly use addresses
Browse files Browse the repository at this point in the history
  • Loading branch information
alaaeddineelamri authored and pstorz committed May 11, 2023
1 parent 6ee68b1 commit 355d201
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions core/src/tests/addresses_and_ports_functions.cc
Expand Up @@ -35,11 +35,10 @@ std::vector<std::string> CreateAddressesFromAddAddress(
{
std::vector<std::string> newaddresses{};
char buf[1024];
dlist<IPADDR>* addresses = new dlist<IPADDR>();
dlist<IPADDR>* addresses = nullptr;

dlist<IPADDR>** fake_resource_pointer = &addresses;
AddAddress(fake_resource_pointer, type, htons(default_port), family,
hostname_str, port_str, buf, sizeof(buf));
AddAddress(&addresses, type, htons(default_port), family, hostname_str,
port_str, buf, sizeof(buf));

IPADDR* addr = nullptr;
foreach_dlist (addr, addresses) {
Expand Down

0 comments on commit 355d201

Please sign in to comment.