]> git.tue.mpg.de Git - paraslash.git/commitdiff
play: Remove pointless goto in play_post_monitor().
authorAndre Noll <maan@tuebingen.mpg.de>
Wed, 14 Jun 2023 20:33:39 +0000 (22:33 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Wed, 4 Sep 2024 13:46:56 +0000 (15:46 +0200)
We may as well return directly.

play.c

diff --git a/play.c b/play.c
index 21f02ef7c55d9a3b2c07eb6cc21373661572dc22..29dc1317499eb2cd49dbe1d1b3653eca17cddcce 100644 (file)
--- 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;
 }
 
 /**