bneradt commented on a change in pull request #7778:
URL: https://github.com/apache/trafficserver/pull/7778#discussion_r626025586



##########
File path: iocore/dns/I_DNSProcessor.h
##########
@@ -151,25 +167,31 @@ extern DNSProcessor dnsProcessor;
 inline Action *
 DNSProcessor::getSRVbyname(Continuation *cont, const char *name, Options const 
&opt)
 {
-  return getby(name, 0, T_SRV, cont, opt);
+  return getby(std::string_view(name), T_SRV, cont, opt);
+}
+
+inline Action *
+DNSProcessor::getSRVbyname(Continuation *cont, std::string_view name, Options 
const &opt)
+{
+  return getby(name, T_SRV, cont, opt);
 }
 
 inline Action *
 DNSProcessor::gethostbyname(Continuation *cont, const char *name, Options 
const &opt)
 {
-  return getby(name, 0, T_A, cont, opt);
+  return getby(std::string_view(name), T_A, cont, opt);
 }
 
 inline Action *
-DNSProcessor::gethostbyname(Continuation *cont, const char *name, int len, 
Options const &opt)
+DNSProcessor::gethostbyname(Continuation *cont, std::string_view name, Options 
const &opt)
 {
-  return getby(name, len, T_A, cont, opt);
+  return getby(name, T_A, cont, opt);
 }
 
 inline Action *
 DNSProcessor::gethostbyaddr(Continuation *cont, IpAddr const *addr, Options 
const &opt)
 {
-  return getby(reinterpret_cast<const char *>(addr), 0, T_PTR, cont, opt);
+  return getby(*addr, T_PTR, cont, opt);
 }

Review comment:
       Yeah, to be clear I was assuming that we expected logically that this 
would not be nullptr. I was just wondering whether it made sense, that being 
the case, to make this a reference.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to