File tree Expand file tree Collapse file tree 3 files changed +4
-9
lines changed Expand file tree Collapse file tree 3 files changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -911,17 +911,14 @@ std::vector<unsigned char> CService::GetKey() const
911
911
return key;
912
912
}
913
913
914
- std::string CService::ToStringPort () const
915
- {
916
- return strprintf (" %u" , port);
917
- }
918
-
919
914
std::string CService::ToStringAddrPort () const
920
915
{
916
+ const auto port_str = strprintf (" %u" , port);
917
+
921
918
if (IsIPv4 () || IsTor () || IsI2P () || IsInternal ()) {
922
- return ToStringAddr () + " :" + ToStringPort () ;
919
+ return ToStringAddr () + " :" + port_str ;
923
920
} else {
924
- return " [" + ToStringAddr () + " ]:" + ToStringPort () ;
921
+ return " [" + ToStringAddr () + " ]:" + port_str ;
925
922
}
926
923
}
927
924
Original file line number Diff line number Diff line change @@ -535,7 +535,6 @@ class CService : public CNetAddr
535
535
friend bool operator !=(const CService& a, const CService& b) { return !(a == b); }
536
536
friend bool operator <(const CService& a, const CService& b);
537
537
std::vector<unsigned char > GetKey () const ;
538
- std::string ToStringPort () const ;
539
538
std::string ToStringAddrPort () const ;
540
539
541
540
CService (const struct in6_addr & ipv6Addr, uint16_t port);
Original file line number Diff line number Diff line change @@ -80,7 +80,6 @@ FUZZ_TARGET(netaddress)
80
80
(void )service.GetKey ();
81
81
(void )service.GetPort ();
82
82
(void )service.ToStringAddrPort ();
83
- (void )service.ToStringPort ();
84
83
(void )CServiceHash ()(service);
85
84
(void )CServiceHash (0 , 0 )(service);
86
85
You can’t perform that action at this time.
0 commit comments