From: Guilherme Maciel Ferreira Date: Tue, 3 Jan 2012 09:53:30 +0000 (-0200) Subject: PC-Lint warnings fixed: X-Git-Tag: v1.3~15 X-Git-Url: http://developer.intra2net.com/git/?a=commitdiff_plain;h=dc313bfe7933cea72542c1315392647fcf0ff572;p=pingcheck PC-Lint warnings fixed: - Info 713: Loss of precision (initialization) (unsigned int to int) --- diff --git a/src/dns/dnsresolver.cpp b/src/dns/dnsresolver.cpp index 0469ace..eebd9c8 100644 --- a/src/dns/dnsresolver.cpp +++ b/src/dns/dnsresolver.cpp @@ -144,7 +144,7 @@ string DnsResolver::get_next_ip() HostAddress host_address = ResolvedHostAddressList.front(); ResolvedHostAddressList.pop_front(); string destination_ip = host_address.get_ip(); - int ttl = host_address.get_ttl().get_updated_value(); + uint32_t ttl = host_address.get_ttl().get_updated_value(); ResolvedHostAddressList.push_back( host_address ); size_t list_size_after = ResolvedHostAddressList.size(); @@ -163,11 +163,11 @@ string DnsResolver::get_next_ip() */ bool DnsResolver::expired_resolved_ip() const { - const int threshold = 10; // TODO configurable + const uint32_t threshold = 10; // TODO configurable BOOST_FOREACH( const HostAddress &host_address, ResolvedHostAddressList ) { - int ttl = host_address.get_ttl().get_updated_value(); + uint32_t ttl = host_address.get_ttl().get_updated_value(); if ( ttl <= threshold ) { return true;