PC-Lint warnings fixed:
authorGuilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
Tue, 3 Jan 2012 09:53:30 +0000 (07:53 -0200)
committerGuilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
Tue, 3 Jan 2012 09:53:30 +0000 (07:53 -0200)
- Info 713: Loss of precision (initialization) (unsigned int to int)

src/dns/dnsresolver.cpp

index 0469ace..eebd9c8 100644 (file)
@@ -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;