From: Andre Noll Date: Wed, 9 Mar 2022 20:59:18 +0000 (+0100) Subject: mood.c: Remove pointless check in reload_current_mood(). X-Git-Tag: v0.7.2~14^2~24 X-Git-Url: http://git.tuebingen.mpg.de/?a=commitdiff_plain;h=9c4691036a9f8999ec19034fb218e8fcdc393475;p=paraslash.git mood.c: Remove pointless check in reload_current_mood(). The function gets only called from the event handler, which returns early without calling reload_current_mood if current_mood and is NULL. --- diff --git a/mood.c b/mood.c index a58284a7..a535bdcf 100644 --- a/mood.c +++ b/mood.c @@ -672,19 +672,16 @@ out: * This function is called on events which render the current list of * admissible files useless, for example if an attribute is removed from the * attribute table. - * - * If no mood is currently open, the function returns success. */ static int reload_current_mood(void) { int ret; char *mood_name = NULL; + assert(current_mood); ret = clear_score_table(); if (ret < 0) return ret; - if (!current_mood) - return 1; PARA_NOTICE_LOG("reloading %s\n", current_mood->name? current_mood->name : "(dummy)"); if (current_mood->name)