From 710652073a945d506afb07db2bd1a30605996198 Mon Sep 17 00:00:00 2001 From: Maxim Devaev Date: Mon, 6 Jun 2022 14:35:31 +0300 Subject: [PATCH] refactoring --- janus/src/plugin.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/janus/src/plugin.c b/janus/src/plugin.c index 9b89378..f0bee21 100644 --- a/janus/src/plugin.c +++ b/janus/src/plugin.c @@ -150,12 +150,12 @@ static int _wait_frame(int fd, memsink_shared_s* mem, uint64_t last_id) { long double deadline_ts = get_now_monotonic() + _g_wait_timeout; long double now; do { - int retval = flock_timedwait_monotonic(fd, _g_lock_timeout); + int result = flock_timedwait_monotonic(fd, _g_lock_timeout); now = get_now_monotonic(); - if (retval < 0 && errno != EWOULDBLOCK) { + if (result < 0 && errno != EWOULDBLOCK) { JLOG_PERROR("video", "Can't lock memsink"); return -1; - } else if (retval == 0) { + } else if (result == 0) { if (mem->magic == MEMSINK_MAGIC && mem->version == MEMSINK_VERSION && mem->id != last_id) { return 0; }