From 463a1cab43fda24f89f71fffc876756dc1bc155a Mon Sep 17 00:00:00 2001 From: Philip Kaufmann Date: Wed, 5 Sep 2012 23:36:19 +0200 Subject: fix signed/unsigned in strprintf and CNetAddr::GetByte() - I checked every occurance of strprintf() in the code and used %u, where unsigned vars are used - the change to GetByte() was made, as ip is an unsigned char --- src/netbase.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/netbase.cpp') diff --git a/src/netbase.cpp b/src/netbase.cpp index b66c36664..4face7a1f 100644 --- a/src/netbase.cpp +++ b/src/netbase.cpp @@ -599,7 +599,7 @@ CNetAddr::CNetAddr(const std::string &strIp, bool fAllowLookup) *this = vIP[0]; } -int CNetAddr::GetByte(int n) const +unsigned int CNetAddr::GetByte(int n) const { return ip[15-n]; } @@ -1135,7 +1135,7 @@ std::vector CService::GetKey() const std::string CService::ToStringPort() const { - return strprintf("%i", port); + return strprintf("%u", port); } std::string CService::ToStringIPPort() const -- cgit v1.2.3