From 33f20dd099c4b47fd1865d7cdaa0bd1841921ac4 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Wed, 14 Jun 2023 22:33:39 +0200 Subject: [PATCH] play: Remove pointless goto in play_post_monitor(). We may as well return directly. --- play.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/play.c b/play.c index 21f02ef7..29dc1317 100644 --- a/play.c +++ b/play.c @@ -1176,7 +1176,7 @@ static int play_post_monitor(struct sched *s, __a_unused void *context) } ret = session_post_monitor(s); if (ret < 0) - goto out; + return ret; if (!pt->wn.btrn && !pt->fn.btrn) { char state = get_playback_state(); if (state == 'P' || state == 'R' || state == 'F') { @@ -1185,8 +1185,7 @@ static int play_post_monitor(struct sched *s, __a_unused void *context) if (ret < 0) { PARA_ERROR_LOG("%s\n", para_strerror(-ret)); pt->rq = CRT_TERM_RQ; - ret = 1; - goto out; + return 1; } pt->next_update = *now; } @@ -1200,9 +1199,7 @@ static int play_post_monitor(struct sched *s, __a_unused void *context) free(str); tv_add(now, &delay, &pt->next_update); } - ret = 1; -out: - return ret; + return 1; } /** -- 2.39.5