Skip to content

Commit

Permalink
Refactor database_info_iterate
Browse files Browse the repository at this point in the history
  • Loading branch information
inactive123 committed May 23, 2015
1 parent 0f4d714 commit c4becce
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tasks/task_database.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ static int database_info_iterate_playlist(
db_state->buf = NULL;
}

db->status = DATABASE_STATUS_ITERATE_NEXT;

return 0;
}
Expand Down Expand Up @@ -122,7 +121,6 @@ static int database_info_iterate(database_state_handle_t *state, database_info_h
break;
case DATABASE_TYPE_ITERATE:
return database_info_iterate_playlist(state, db, name);
break;
}

return 0;
Expand Down Expand Up @@ -175,7 +173,8 @@ void rarch_main_data_db_iterate(bool is_thread, void *data)
database_info_iterate_start(db, name);
break;
case DATABASE_STATUS_ITERATE:
database_info_iterate(&runloop->db.state, db);
if (database_info_iterate(&runloop->db.state, db) == 0)
db->status = DATABASE_STATUS_ITERATE_NEXT;
break;
case DATABASE_STATUS_ITERATE_NEXT:
if (database_info_iterate_next(db) == 0)
Expand Down

0 comments on commit c4becce

Please sign in to comment.