mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-09 18:16:09 +03: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
Notes:
sideshowbarker
2024-07-17 08:37:36 +09:00
Author: https://github.com/bugaevc Commit: https://github.com/SerenityOS/serenity/commit/976d93d910 Pull-request: https://github.com/SerenityOS/serenity/pull/20961 Reviewed-by: https://github.com/ADKaster ✅
@ -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 New Issue
Block a user