From 7a323223febcb3cb6663972030df39bd4d5334d8 Mon Sep 17 00:00:00 2001 From: holmes1412 Date: Thu, 3 Mar 2022 15:09:27 +0800 Subject: [PATCH] remove comparison in WFServiceGorvernance::copy_host_port() --- src/nameservice/WFServiceGovernance.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nameservice/WFServiceGovernance.cc b/src/nameservice/WFServiceGovernance.cc index 3b727d72..edb3ef94 100644 --- a/src/nameservice/WFServiceGovernance.cc +++ b/src/nameservice/WFServiceGovernance.cc @@ -67,13 +67,13 @@ public: static void copy_host_port(ParsedURI& uri, const EndpointAddress *addr) { - if (!addr->host.empty() && addr->host != uri.host) + if (!addr->host.empty()) { free(uri.host); uri.host = strdup(addr->host.c_str()); } - if (!addr->port.empty() && addr->port != uri.port) + if (!addr->port.empty()) { free(uri.port); uri.port = strdup(addr->port.c_str());