]> granicus.if.org Git - pdns/commitdiff
Fix narrowing issue
authorAki Tuomi <cmouse@desteem.org>
Thu, 6 Feb 2014 11:47:45 +0000 (13:47 +0200)
committerAki Tuomi <cmouse@desteem.org>
Fri, 7 Feb 2014 07:48:47 +0000 (09:48 +0200)
pdns/syncres.hh

index 5ef7fc030c94c70791cbe2c5efd6e9aee950ea2d..b6b4920d9d96fa753d01de262ade7a5f265f8595 100644 (file)
@@ -69,7 +69,7 @@ public:
 
     return true; // still listed, still blocked
   }
-  void throttle(time_t now, const Thing& t, unsigned int ttl=0, unsigned int tries=0) 
+  void throttle(time_t now, const Thing& t, time_t ttl=0, unsigned int tries=0) 
   {
     typename cont_t::iterator i=d_cont.find(t);
     entry e={ now+(ttl ? ttl : d_ttl), tries ? tries : d_limit};
@@ -86,13 +86,13 @@ public:
     return (unsigned int)d_cont.size();
   }
 private:
-  int d_limit;
-  int d_ttl;
+  unsigned int d_limit;
+  time_t d_ttl;
   time_t d_last_clean;
   struct entry 
   {
     time_t ttd;
-    int count;
+    unsigned int count;
   };
   typedef map<Thing,entry> cont_t;
   cont_t d_cont;