From c6873084d11a7214c75a44692d53f0562e76b4b2 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sat, 28 Feb 2009 18:21:55 +0100 Subject: [PATCH] Simplify compute_slice_timeout(). --- vss.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/vss.c b/vss.c index 330bba6a..17bd5fbc 100644 --- a/vss.c +++ b/vss.c @@ -335,21 +335,16 @@ static void compute_slice_timeout(struct timeval *timeout) assert(vss_playing()); list_for_each_entry(fc, &fec_client_list, node) { struct timeval diff; - int ret = next_slice_is_due(fc, &diff); - // PARA_NOTICE_LOG("diff: %lu, ret: %d\n", tv2ms(&diff), ret); - if (ret) { + if (next_slice_is_due(fc, &diff)) { timeout->tv_sec = 0; timeout->tv_usec = 0; - goto out; + return; } /* timeout = min(timeout, diff) */ if (tv_diff(&diff, timeout, NULL) < 0) *timeout = diff; } -out: - return; - PARA_NOTICE_LOG("slice timeout: %lu:%lu\n", (long unsigned)timeout->tv_sec, (long unsigned)timeout->tv_usec); } /** -- 2.39.5