From: Andre Noll Date: Tue, 8 Mar 2022 22:50:02 +0000 (+0100) Subject: Remove E_NO_MOOD, X-Git-Tag: v0.7.2~14^2~26 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=6558ba12e9699979aba97292c7cd41889619b83c;p=paraslash.git Remove E_NO_MOOD, row_is_admissible() is never called with a NULL mood pointer. --- diff --git a/error.h b/error.h index 82920ea8..5268feae 100644 --- a/error.h +++ b/error.h @@ -148,7 +148,6 @@ 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 bcc9bc57..acf8e2ad 100644 --- 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); }