From 9ff8e02e543ede2b1964e5ea3f26f00bf2ff90ec Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 4 Sep 2024 17:26:45 +0200 Subject: [PATCH] net/Resolver: use StringIsEqual() --- src/net/Resolver.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/net/Resolver.cxx b/src/net/Resolver.cxx index 1d9d9a6bf..915975f1a 100644 --- a/src/net/Resolver.cxx +++ b/src/net/Resolver.cxx @@ -7,6 +7,7 @@ #include "HostParser.hxx" #include "lib/fmt/RuntimeError.hxx" #include "util/CharUtil.hxx" +#include "util/StringAPI.hxx" #ifdef _WIN32 #include @@ -16,8 +17,6 @@ #include #endif -#include - #include AddressInfoList @@ -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;