mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 05:17:35 +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
1 changed files with 1 additions and 1 deletions
|
@ -24,7 +24,7 @@ Answer::Answer(Name const& name, RecordType type, RecordClass class_code, u32 tt
|
||||||
|
|
||||||
bool Answer::has_expired() const
|
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
|
unsigned Answer::hash() const
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue