The previous patch introduced two instances of a bug which weren't noticed by
the compiler because attribute_table and score_table were declared as void *
pointers. Change that to struct osl_table *, and add the missing '&' operator.
void * pointers a evil.
#include "string.h"
#include "net.h"
-static void *attribute_table;
+static struct osl_table *attribute_table;
static int greatest_att_bitnum;
/** The columns of the attribute table. */
attribute_table_desc.dir = db;
ti->desc = &attribute_table_desc;
- ret = osl_open_table(ti->desc, attribute_table);
+ ret = osl_open_table(ti->desc, &attribute_table);
greatest_att_bitnum = -1; /* no atts available */
if (ret >= 0) {
find_greatest_att_bitnum();
#include "list.h"
#include "string.h"
-static void *score_table;
+static struct osl_table *score_table;
static int ptr_compare(const struct osl_object *obj1, const struct osl_object *obj2)
{
score_table_desc.dir = db;
ti->desc = &score_table_desc;
ti->flags = TBLFLAG_SKIP_CREATE;
- return osl_open_table(ti->desc, score_table);
+ return osl_open_table(ti->desc, &score_table);
}