From dc313bfe7933cea72542c1315392647fcf0ff572 Mon Sep 17 00:00:00 2001 From: Guilherme Maciel Ferreira Date: Tue, 3 Jan 2012 07:53:30 -0200 Subject: [PATCH] PC-Lint warnings fixed: - Info 713: Loss of precision (initialization) (unsigned int to int) --- src/dns/dnsresolver.cpp | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) 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; -- 1.7.1