X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=mood.c;fp=mood.c;h=208bdc45ea5adf7d9c4ca67e505902d694718306;hp=2b063cfd6b804373fb8f623b377781d949e53acf;hb=fd98a9eb785bb0809269bfc623ba16c452fb0c1a;hpb=5ba99bfbb7ec52efd4f2af8840ba7e5f8eabaa83 diff --git a/mood.c b/mood.c index 2b063cfd..208bdc45 100644 --- a/mood.c +++ b/mood.c @@ -142,8 +142,8 @@ static bool get_item_score(struct mood_item *item, const struct afs_info *afsi, } /* returns 1 if row admissible, 0 if not, negative on errors */ -static int compute_mood_score(const struct osl_row *aft_row, struct mood *m, - long *result) +static int row_is_admissible(const struct osl_row *aft_row, struct mood *m, + long *scorep) { struct mood_item *item; int ret; @@ -192,7 +192,7 @@ static int compute_mood_score(const struct osl_row *aft_row, struct mood *m, } if (score_arg_sum) score /= score_arg_sum; - *result = score; + *scorep = score; return 1; } @@ -571,7 +571,7 @@ static int add_if_admissible(struct osl_row *aft_row, void *data) int ret; long score = 0; - ret = compute_mood_score(aft_row, aa->m, &score); + ret = row_is_admissible(aft_row, aa->m, &score); if (ret <= 0) return ret; if (statistics.num >= aa->size) { @@ -718,7 +718,7 @@ static int mood_update_audio_file(const struct osl_row *aft_row, if (ret < 0) return ret; was_admissible = ret; - ret = compute_mood_score(aft_row, current_mood, &score); + ret = row_is_admissible(aft_row, current_mood, &score); if (ret < 0) return ret; is_admissible = (ret > 0);