From f3f4730c2236a3f27a921d818f14bc62b0e311d0 Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Sat, 13 Mar 2021 12:41:34 -0800 Subject: get_frames: remove superfluous avd assignment Since avd is unconditionally copied just a few lines down, this copy is pointless and harms readability. I think when it was originally written there was going to be an else branch where the unconditional copy is currently, but never bothered. The avd shared variable should really get changed to an atomic, removing its lock. To anyone reading: PRs welcome. --- src/rmd_get_frames.c | 1 - 1 file changed, 1 deletion(-) (limited to 'src') diff --git a/src/rmd_get_frames.c b/src/rmd_get_frames.c index 931d8b2..bf7ff84 100644 --- a/src/rmd_get_frames.c +++ b/src/rmd_get_frames.c @@ -307,7 +307,6 @@ static boolean sync_next_frame(ProgData *pdata) if (pdata->last_frame_ts.tv_sec) { pthread_mutex_lock(&pdata->avd_mutex); pdata->avd -= timespec_delta_in_us(&now, &pdata->last_frame_ts); - avd = pdata->avd; pthread_mutex_unlock(&pdata->avd_mutex); } -- cgit v1.2.3