mirror of
https://github.com/SerenityOS/serenity
synced 2024-10-15 12:23:15 +00:00
LibDNS: Fix compilation with signed time_t
With signed 32-bit time_t, the type of time_t + m_ttl is unsigned int, which results in -Werror=sign-compare. Fix this by explicitly casting it back to time_t.
This commit is contained in:
parent
fcced97509
commit
976d93d910
|
@ -24,7 +24,7 @@ Answer::Answer(Name const& name, RecordType type, RecordClass class_code, u32 tt
|
|||
|
||||
bool Answer::has_expired() const
|
||||
{
|
||||
return time(nullptr) >= m_received_time + m_ttl;
|
||||
return time(nullptr) >= static_cast<time_t>(m_received_time + m_ttl);
|
||||
}
|
||||
|
||||
unsigned Answer::hash() const
|
||||
|
|
Loading…
Reference in a new issue