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
This commit is contained in:
Philip Kaufmann
2012-09-05 23:36:19 +02:00
parent 0a4e67afad
commit 463a1cab43
5 changed files with 9 additions and 9 deletions

View File

@@ -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<unsigned char> CService::GetKey() const
std::string CService::ToStringPort() const
{
return strprintf("%i", port);
return strprintf("%u", port);
}
std::string CService::ToStringIPPort() const