From b569d5b13ff8e1861fd6618b8c5c57fe8534a8a7 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Tue, 20 May 2025 22:10:31 +0200 Subject: [PATCH] mood.c: Remove a dead store and fix the documentation of mood_load(). The function returns 1 on success, not the number of admissible files. Found by the clang analyzer. --- mood.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/mood.c b/mood.c index 0187bc4c..01ef2c8a 100644 --- a/mood.c +++ b/mood.c @@ -614,9 +614,8 @@ static void compute_correction_factors(int64_t sse, struct afs_statistics *s) * If the message pointer is not NULL, a suitable message is returned there in * all cases. The caller must free this string. * - * \return The number of admissible files on success, negative on errors. On - * errors, the current mood remains unaffected even if result is NULL. It is - * not considered an error if no files are admissible. + * \return Standard. On errors, the current mood remains unaffected even if + * result is NULL. It is not considered an error if no files are admissible. * * \sa \ref mp_eval_row(). */ @@ -659,7 +658,6 @@ int mood_load(const char *mood_name, struct mood_instance **result, char **msg) /* success */ if (msg) *msg = get_statistics(aa.m, rnow.tv_sec); - ret = aa.m->stats.num; if (result) *result = aa.m; else { -- 2.39.5