struct table_info {
const struct osl_table_description *desc;
- struct osl_table *table;
enum afs_table_flags flags;
};
audio_file_table_desc.dir = db;
ti->desc = &audio_file_table_desc;
- ret = osl_open_table(ti->desc, &ti->table);
+ ret = osl_open_table(ti->desc, &audio_file_table);
if (ret >= 0) {
unsigned num;
- audio_file_table = ti->table;
osl_get_num_rows(audio_file_table, &num);
PARA_INFO_LOG("audio file table contains %d files\n", num);
return ret;
attribute_table_desc.dir = db;
ti->desc = &attribute_table_desc;
- ret = osl_open_table(ti->desc, &ti->table);
+ ret = osl_open_table(ti->desc, attribute_table);
greatest_att_bitnum = -1; /* no atts available */
if (ret >= 0) {
- attribute_table = ti->table;
find_greatest_att_bitnum();
return ret;
}
int ret;
desc->dir = db;
ti->desc = desc;
- ret = osl_open_table(ti->desc, &ti->table);
- if (ret >= 0) {
- *table = ti->table;
+ ret = osl_open_table(ti->desc, table);
+ if (ret >= 0)
return ret;
- }
*table = NULL;
return ret == -E_NOENT? 1 : ret;
}
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);
}