Commit 4a604f31 authored by Steve Lhomme's avatar Steve Lhomme Committed by Rémi Denis-Courmont

ttml: simplify tt_time_Compare()

The case where one of the values is invalid is still not handled.
Signed-off-by: Rémi Denis-Courmont's avatarRémi Denis-Courmont <remi@remlab.net>
parent 6e398385
......@@ -129,10 +129,11 @@ static inline mtime_t tt_time_Convert( const tt_time_t *t )
static inline int tt_time_Compare( const tt_time_t *t1, const tt_time_t *t2 )
{
if( tt_time_Convert( t1 ) < tt_time_Convert( t2 ) )
mtime_t ttt1 = tt_time_Convert( t1 );
mtime_t ttt2 = tt_time_Convert( t2 );
if (ttt1 < ttt2)
return -1;
else
return ( tt_time_Convert( t1 ) > tt_time_Convert( t2 ) );
return ttt1 > ttt2;
}
static inline tt_time_t tt_time_Add( tt_time_t t1, tt_time_t t2 )
......
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