]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
Remove E_NO_MOOD,
authorAndre Noll <maan@tuebingen.mpg.de>
Tue, 8 Mar 2022 22:50:02 +0000 (23:50 +0100)
committerAndre Noll <maan@tuebingen.mpg.de>
Mon, 17 Oct 2022 18:36:21 +0000 (20:36 +0200)
row_is_admissible() is never called with a NULL mood pointer.

error.h
mood.c

diff --git a/error.h b/error.h
index 82920ea8007e0d17d9de4b02ead6d402c9a334b4..5268feaeb346ba39f66e596852ae51ccf3d33348 100644 (file)
--- a/error.h
+++ b/error.h
        PARA_ERROR(NO_AUDIO_FILE, "no audio file"), \
        PARA_ERROR(NOFD, "did not receive open fd from afs"), \
        PARA_ERROR(NO_MATCH, "no matches"), \
-       PARA_ERROR(NO_MOOD, "no mood available"), \
        PARA_ERROR(NO_MORE_SLOTS, "no more empty slots"), \
        PARA_ERROR(NOT_PLAYING, "not playing"), \
        PARA_ERROR(NO_VALID_FILES, "no valid file found in playlist"), \
diff --git a/mood.c b/mood.c
index bcc9bc57d1a37520ca71f93d5d93a7fe1e2e2927..acf8e2ad6a324f0a38894a9473bd54c1b097e4db 100644 (file)
--- a/mood.c
+++ b/mood.c
@@ -122,8 +122,7 @@ __a_const static uint64_t int_sqrt(uint64_t x)
 /* returns 1 if row admissible, 0 if not, negative on errors */
 static int row_is_admissible(const struct osl_row *aft_row, struct mood *m)
 {
-       if (!m)
-               return -E_NO_MOOD;
+       assert(m);
        return mp_eval_row(aft_row, m->parser_context);
 }