int nBitsS = BN_num_bits(sig->s);
if (nBitsR <= 256 && nBitsS <= 256)
{
- int nRecId = -1;
- for (int i=0; i<4; i++)
+ int8_t nRecId = -1;
+ for (int8_t i=0; i<4; i++)
{
CKey keyRec;
keyRec.fSet = true;
*this = vIP[0];
}
-unsigned int CNetAddr::GetByte(int n) const
+uint8_t CNetAddr::GetByte(int n) const
{
return ip[15-n];
}
std::vector<unsigned char> CNetAddr::GetGroup() const
{
std::vector<unsigned char> vchRet;
- int nClass = NET_IPV6;
+ uint8_t nClass = NET_IPV6;
int nStartByte = 0;
int nBits = 16;
enum Network GetNetwork() const;
std::string ToString() const;
std::string ToStringIP() const;
- unsigned int GetByte(int n) const;
+ uint8_t GetByte(int n) const;
uint64_t GetHash() const;
bool GetInAddr(struct in_addr* pipv4Addr) const;
std::vector<unsigned char> GetGroup() const;
req = (struct stun_header *)reqdata;
stun_req_id(req);
- int reqlen = 0;
+ unsigned short reqlen = 0;
req->msgtype = 0;
req->msglen = 0;
req->msglen = htons(reqlen);
void createConf()
{
- srand(time(NULL));
+ srand(static_cast<unsigned int>(time(NULL)));
ofstream pConf;
#if BOOST_FILESYSTEM_VERSION >= 3