Skip to content

Commit

Permalink
net/Resolver: use StringIsEqual()
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxKellermann committed Sep 4, 2024
1 parent 32dd970 commit 9ff8e02
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/net/Resolver.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include "HostParser.hxx"
#include "lib/fmt/RuntimeError.hxx"
#include "util/CharUtil.hxx"
#include "util/StringAPI.hxx"

#ifdef _WIN32
#include <ws2tcpip.h>
Expand All @@ -16,8 +17,6 @@
#include <net/if.h>
#endif

#include <cstring>

#include <stdio.h>

AddressInfoList
Expand Down Expand Up @@ -107,7 +106,7 @@ Resolve(const char *host_and_port, int default_port,
} else
throw std::runtime_error("Garbage after host name");

if (ai_is_passive(hints) && strcmp(host, "*") == 0)
if (ai_is_passive(hints) && StringIsEqual(host, "*"))
host = nullptr;
} else {
host = nullptr;
Expand Down

0 comments on commit 9ff8e02

Please sign in to comment.