Commit e3eddd4f authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

mtime: remove LAST_MDATE

Almost every existing use cases uses INT64_MAX directly already. Also,
the signedness was wrong.
parent 84ece839
......@@ -32,16 +32,6 @@
#ifndef __VLC_MTIME_H
# define __VLC_MTIME_H 1
/*****************************************************************************
* LAST_MDATE: date which will never happen
*****************************************************************************
* This date can be used as a 'never' date, to mark missing events in a function
* supposed to return a date, such as nothing to display in a function
* returning the date of the first image to be displayed. It can be used in
* comparaison with other values: all existing dates will be earlier.
*****************************************************************************/
#define LAST_MDATE ((mtime_t)((uint64_t)(-1)/2))
/*****************************************************************************
* MSTRTIME_MAX_SIZE: maximum possible size of mstrtime
*****************************************************************************
......
......@@ -384,7 +384,7 @@ static void toggle_timeout(DBusTimeout *to, void *data)
static int next_timeout(intf_thread_t *intf)
{
intf_sys_t *sys = intf->p_sys;
mtime_t next_timeout = LAST_MDATE;
mtime_t next_timeout = INT64_MAX;
unsigned count = vlc_array_count(&sys->timeouts);
for (unsigned i = 0; i < count; i++)
......@@ -400,7 +400,7 @@ static int next_timeout(intf_thread_t *intf)
next_timeout = *expiry;
}
if (next_timeout >= LAST_MDATE)
if (next_timeout >= INT64_MAX)
return -1;
next_timeout /= 1000;
......
......@@ -104,7 +104,7 @@ void X11TimerLoop::removeTimer( X11Timer &rTimer )
void X11TimerLoop::waitNextTimer()
{
mtime_t curDate = mdate();
mtime_t nextDate = LAST_MDATE;
mtime_t nextDate = INT64_MAX;
X11Timer *nextTimer = NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment