uint32_t getStartOfWeek()
{
- // coverity[store_truncated_time_t]
+ // coverity[store_truncates_time_t]
uint32_t now = time(nullptr);
now -= (now % (7*86400));
return now;
break;
case SvcParam::ipv6hint:
xfr16BitInt(param.getIPHints().size() * 16); // size
- for (auto a: param.getIPHints()) {
+ for (const auto& a: param.getIPHints()) {
xfrCAWithoutPort(param.getKey(), a);
}
break;
void setTime(time_t sec, uint32_t usec)
{
- // coverity[store_truncated_time_t]
+ // coverity[store_truncates_time_t]
add_uint32(d_message, Field::timeSec, sec);
add_uint32(d_message, Field::timeUsec, usec);
}
dr.d_type = entry->d_qtype;
dr.d_class = QClass::IN;
dr.d_content = k;
- // coverity[store_truncated_time_t]
+ // coverity[store_truncates_time_t]
dr.d_ttl = static_cast<uint32_t>(entry->d_ttd);
dr.d_place = DNSResourceRecord::ANSWER;
res->push_back(std::move(dr));
}
if (ttl > 0 && SyncRes::s_refresh_ttlperc > 0) {
const uint32_t deadline = origTTL * SyncRes::s_refresh_ttlperc / 100;
- // coverity[store_truncated_time_t]
+ // coverity[store_truncates_time_t]
const bool almostExpired = static_cast<uint32_t>(ttl) <= deadline;
if (almostExpired && qname != g_rootdnsname) {
if (refresh) {
const time_t ttl = d_ttd - now;
const uint32_t lockline = d_orig_ttl * percentage / 100;
// We know ttl is > 0 as d_ttd > now
- // coverity[store_truncated_time_t]
+ // coverity[store_truncates_time_t]
const bool locked = static_cast<uint32_t>(ttl) > lockline;
if (locked) {
return false;