Commit 91b27e49 authored by Stefano Sabatini's avatar Stefano Sabatini

ffplay: compact expression in compute_mod()

Prefer "return X ? Y : Z" over "if (x) return Y; else return Z",
reduce line count.
Signed-off-by: 's avatarStefano Sabatini <stefano.sabatini-lala@poste.it>
parent 6873cf9b
......@@ -771,11 +771,7 @@ static void video_image_display(VideoState *is)
static inline int compute_mod(int a, int b)
{
a = a % b;
if (a >= 0)
return a;
else
return a + b;
return a < 0 ? a%b + b : a%b;
}
static void video_audio_display(VideoState *s)
......
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