From: Andre Noll Date: Sat, 28 Feb 2009 17:21:55 +0000 (+0100) Subject: Simplify compute_slice_timeout(). X-Git-Tag: v0.3.4~57^2~14 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=c6873084d11a7214c75a44692d53f0562e76b4b2;p=paraslash.git Simplify compute_slice_timeout(). --- 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); } /**