]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - score.c
README,INSTALL: Fix some spelling errors.
[paraslash.git] / score.c
diff --git a/score.c b/score.c
index b53d60b38b582b6989f65fc290e894647e53f1f7..ad147bba1ef7dc9ac90fbcb30e20a267e0376160 100644 (file)
--- a/score.c
+++ b/score.c
@@ -12,9 +12,7 @@
 #include "list.h"
 #include "string.h"
 
-int mood_compute_score(const void *row, long *score);
-
-static void *score_table;
+static struct osl_table *score_table;
 
 static int ptr_compare(const struct osl_object *obj1, const struct osl_object *obj2)
 {
@@ -342,6 +340,7 @@ int row_belongs_to_score_table(const struct osl_row *aft_row)
 void score_shutdown(enum osl_close_flags flags)
 {
        osl_close_table(score_table, flags | OSL_FREE_VOLATILE);
+       score_table = NULL;
 }
 
 /**
@@ -359,8 +358,5 @@ int score_init(struct table_info *ti, const char *db)
        score_table_desc.dir = db;
        ti->desc = &score_table_desc;
        ti->flags = TBLFLAG_SKIP_CREATE;
-       int ret = osl_open_table(ti->desc, &ti->table);
-
-       score_table = ti->table;
-       return ret;
+       return osl_open_table(ti->desc, &score_table);
 }