mirror of
https://github.com/libretro/RetroArch
synced 2025-04-18 05:43:34 +00:00
* database_info cleanups:
- database_cursor_close's return value was never used, and doesn't necessitate a function either - some other misc. cleanups
This commit is contained in:
parent
cc199b71db
commit
28f55845b6
@ -742,14 +742,6 @@ error:
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int database_cursor_close(libretrodb_t *db, libretrodb_cursor_t *cur)
|
|
||||||
{
|
|
||||||
libretrodb_cursor_close(cur);
|
|
||||||
libretrodb_close(db);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool type_is_prioritized(const char *path)
|
static bool type_is_prioritized(const char *path)
|
||||||
{
|
{
|
||||||
const char *ext = path_get_extension(path);
|
const char *ext = path_get_extension(path);
|
||||||
@ -789,11 +781,9 @@ database_info_handle_t *database_info_dir_init(const char *dir,
|
|||||||
|
|
||||||
core_info_get_list(&core_info_list);
|
core_info_get_list(&core_info_list);
|
||||||
|
|
||||||
list = dir_list_new(dir, core_info_list ? core_info_list->all_ext : NULL,
|
if (!(list = dir_list_new(dir, core_info_list ? core_info_list->all_ext : NULL,
|
||||||
false, show_hidden_files,
|
false, show_hidden_files,
|
||||||
false, true);
|
false, true)))
|
||||||
|
|
||||||
if (!list)
|
|
||||||
{
|
{
|
||||||
free(db);
|
free(db);
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -820,16 +810,13 @@ database_info_handle_t *database_info_file_init(const char *path,
|
|||||||
if (!db)
|
if (!db)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
attr.i = 0;
|
if (!(list = string_list_new()))
|
||||||
|
|
||||||
list = string_list_new();
|
|
||||||
|
|
||||||
if (!list)
|
|
||||||
{
|
{
|
||||||
free(db);
|
free(db);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
attr.i = 0;
|
||||||
string_list_append(list, path, attr);
|
string_list_append(list, path, attr);
|
||||||
|
|
||||||
db->status = DATABASE_STATUS_ITERATE;
|
db->status = DATABASE_STATUS_ITERATE;
|
||||||
@ -842,10 +829,8 @@ database_info_handle_t *database_info_file_init(const char *path,
|
|||||||
|
|
||||||
void database_info_free(database_info_handle_t *db)
|
void database_info_free(database_info_handle_t *db)
|
||||||
{
|
{
|
||||||
if (!db)
|
if (db)
|
||||||
return;
|
string_list_free(db->list);
|
||||||
|
|
||||||
string_list_free(db->list);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
database_info_list_t *database_info_list_new(
|
database_info_list_t *database_info_list_new(
|
||||||
@ -990,7 +975,8 @@ database_info_list_t *database_info_list_new(
|
|||||||
end:
|
end:
|
||||||
if (db)
|
if (db)
|
||||||
{
|
{
|
||||||
database_cursor_close(db, cur);
|
libretrodb_cursor_close(cur);
|
||||||
|
libretrodb_close(db);
|
||||||
libretrodb_free(db);
|
libretrodb_free(db);
|
||||||
}
|
}
|
||||||
if (cur)
|
if (cur)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user