From: Aki Tuomi Date: Thu, 6 Feb 2014 11:47:45 +0000 (+0200) Subject: Fix narrowing issue X-Git-Tag: rec-3.6.0-rc1~191^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b747bce8e8bfc33b89b47cd286b99e299e77558a;p=thirdparty%2Fpdns.git Fix narrowing issue --- diff --git a/pdns/syncres.hh b/pdns/syncres.hh index 5ef7fc030c..b6b4920d9d 100644 --- a/pdns/syncres.hh +++ b/pdns/syncres.hh @@ -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 cont_t; cont_t d_cont;