mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-01 06:07:59 +00:00
AK: Make timeval_add() and timeval_sub() take references.
This commit is contained in:
@@ -1767,8 +1767,7 @@ int Process::sys$select(const Syscall::SC_select_params* params)
|
||||
return -EINVAL;
|
||||
|
||||
if (params->timeout && (params->timeout->tv_sec || params->timeout->tv_usec)) {
|
||||
auto now = kgettimeofday();
|
||||
AK::timeval_add(&now, params->timeout, ¤t->m_select_timeout);
|
||||
timeval_add(kgettimeofday(), *params->timeout, current->m_select_timeout);
|
||||
current->m_select_has_timeout = true;
|
||||
} else {
|
||||
current->m_select_has_timeout = false;
|
||||
@@ -1842,8 +1841,7 @@ int Process::sys$poll(pollfd* fds, int nfds, int timeout)
|
||||
timeout -= 1000;
|
||||
}
|
||||
tvtimeout.tv_usec = timeout * 1000;
|
||||
auto now = kgettimeofday();
|
||||
AK::timeval_add(&now, &tvtimeout, ¤t->m_select_timeout);
|
||||
timeval_add(kgettimeofday(), tvtimeout, current->m_select_timeout);
|
||||
current->m_select_has_timeout = true;
|
||||
} else {
|
||||
current->m_select_has_timeout = false;
|
||||
|
||||
Reference in New Issue
Block a user