]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - mood.c
afs.c: Kill unused struct callback_data.
[paraslash.git] / mood.c
diff --git a/mood.c b/mood.c
index b65561d582e84a8e12ef57daa8523cce660d878a..decc77fc74f407b901ac13b59e18afe32da308e5 100644 (file)
--- a/mood.c
+++ b/mood.c
@@ -1,5 +1,6 @@
 #include "para.h"
 #include "error.h"
+#include "afh.h"
 #include "afs.h"
 #include "list.h"
 #include "string.h"
@@ -235,11 +236,6 @@ static int mm_is_set_score_function(const struct osl_row *row, void *bitnum)
        return -100;
 }
 
-static int para_random(unsigned max)
-{
-       return ((max + 0.0) * (rand() / (RAND_MAX + 1.0)));
-}
-
 /* returns 1 if row matches score item, -1 otherwise */
 static int add_item_score(const void *row, struct mood_item *item, long *score,
                long *score_arg_sum)
@@ -277,10 +273,8 @@ static int compute_mood_score(const void *row, long *result)
        /* reject if there is no matching entry in the accept list */
        if (!match && !list_empty(&current_mood->accept_list))
                return -E_NOT_ADMISSIBLE;
-       list_for_each_entry(item, &current_mood->score_list, mood_item_node) {
-               PARA_INFO_LOG("random: %d\n", para_random(100));
+       list_for_each_entry(item, &current_mood->score_list, mood_item_node)
                add_item_score(row, item, &score, &score_arg_sum);
-       }
        if (score_arg_sum)
                score /= score_arg_sum;
        *result = score;