mirror of
https://github.com/libretro/RetroArch
synced 2025-03-23 01:21:47 +00:00
(tasks) Cleanups
This commit is contained in:
parent
49c08fdba9
commit
a10cdfa8b1
@ -48,7 +48,8 @@ static int zlib_compare_crc32(const char *name, const char *valid_exts,
|
||||
static int database_info_iterate_start
|
||||
(database_info_handle_t *db, const char *name)
|
||||
{
|
||||
char msg[PATH_MAX_LENGTH];
|
||||
char msg[PATH_MAX_LENGTH] = {0};
|
||||
|
||||
snprintf(msg, sizeof(msg),
|
||||
#ifdef _WIN32
|
||||
"%Iu/%Iu: Scanning %s...\n",
|
||||
@ -73,7 +74,7 @@ static int database_info_iterate_playlist(
|
||||
database_state_handle_t *db_state,
|
||||
database_info_handle_t *db, const char *name)
|
||||
{
|
||||
char parent_dir[PATH_MAX_LENGTH];
|
||||
char parent_dir[PATH_MAX_LENGTH] = {0};
|
||||
|
||||
path_parent_dir(parent_dir);
|
||||
|
||||
@ -153,10 +154,10 @@ static int database_info_list_iterate_found_match(
|
||||
const char *zip_name
|
||||
)
|
||||
{
|
||||
char db_crc[PATH_MAX_LENGTH];
|
||||
char db_playlist_path[PATH_MAX_LENGTH];
|
||||
char db_playlist_base_str[PATH_MAX_LENGTH];
|
||||
char entry_path_str[PATH_MAX_LENGTH];
|
||||
char db_crc[PATH_MAX_LENGTH] = {0};
|
||||
char db_playlist_path[PATH_MAX_LENGTH] = {0};
|
||||
char db_playlist_base_str[PATH_MAX_LENGTH] = {0};
|
||||
char entry_path_str[PATH_MAX_LENGTH] = {0};
|
||||
const char *db_playlist_base = NULL;
|
||||
content_playlist_t *playlist = NULL;
|
||||
settings_t *settings = config_get_ptr();
|
||||
@ -231,7 +232,7 @@ static int database_info_iterate_crc_lookup(
|
||||
|
||||
if (db_state->entry_index == 0)
|
||||
{
|
||||
char query[50];
|
||||
char query[50] = {0};
|
||||
snprintf(query, sizeof(query), "{crc: b\"%08X\"}", swap_if_big32(db_state->crc));
|
||||
|
||||
database_info_list_iterate_new(db_state, query);
|
||||
@ -319,7 +320,8 @@ static int database_info_iterate(database_state_handle_t *state, database_info_h
|
||||
|
||||
static int database_info_poll(db_handle_t *db)
|
||||
{
|
||||
char elem0[PATH_MAX_LENGTH], elem1[PATH_MAX_LENGTH];
|
||||
char elem0[PATH_MAX_LENGTH] = {0};
|
||||
char elem1[PATH_MAX_LENGTH] = {0};
|
||||
struct string_list *str_list = NULL;
|
||||
const char *path = msg_queue_pull(db->msg_queue);
|
||||
|
||||
|
@ -385,7 +385,8 @@ static int cb_nbio_image_menu_boxart(void *data, size_t len)
|
||||
|
||||
static int rarch_main_data_nbio_iterate_poll(nbio_handle_t *nbio)
|
||||
{
|
||||
char elem0[PATH_MAX_LENGTH], elem1[PATH_MAX_LENGTH];
|
||||
char elem0[PATH_MAX_LENGTH] = {0};
|
||||
char elem1[PATH_MAX_LENGTH] = {0};
|
||||
struct nbio_t* handle = NULL;
|
||||
struct string_list *str_list = NULL;
|
||||
const char *path = NULL;
|
||||
@ -472,9 +473,7 @@ static int rarch_main_data_nbio_iterate_transfer(nbio_handle_t *nbio)
|
||||
|
||||
static int rarch_main_data_nbio_iterate_parse_free(nbio_handle_t *nbio)
|
||||
{
|
||||
if (!nbio)
|
||||
return -1;
|
||||
if (!nbio->is_finished)
|
||||
if (!nbio || !nbio->is_finished)
|
||||
return -1;
|
||||
|
||||
nbio_free(nbio->handle);
|
||||
|
@ -34,7 +34,7 @@ static int zlib_extract_core_callback(const char *name, const char *valid_exts,
|
||||
const uint8_t *cdata, unsigned cmode, uint32_t csize, uint32_t size,
|
||||
uint32_t crc32, void *userdata)
|
||||
{
|
||||
char path[PATH_MAX_LENGTH];
|
||||
char path[PATH_MAX_LENGTH] = {0};
|
||||
|
||||
/* Make directory */
|
||||
fill_pathname_join(path, (const char*)userdata, name, sizeof(path));
|
||||
@ -75,9 +75,10 @@ error:
|
||||
|
||||
static int cb_core_updater_download(void *data, size_t len)
|
||||
{
|
||||
const char* file_ext = NULL;
|
||||
char output_path[PATH_MAX_LENGTH], msg[PATH_MAX_LENGTH];
|
||||
settings_t *settings = config_get_ptr();
|
||||
const char *file_ext = NULL;
|
||||
char output_path[PATH_MAX_LENGTH] = {0};
|
||||
char msg[PATH_MAX_LENGTH] = {0};
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
if (!data)
|
||||
return -1;
|
||||
@ -192,7 +193,7 @@ static int cb_http_conn_default(void *data_, size_t len)
|
||||
**/
|
||||
static int rarch_main_data_http_iterate_poll(http_handle_t *http)
|
||||
{
|
||||
char elem0[PATH_MAX_LENGTH];
|
||||
char elem0[PATH_MAX_LENGTH] = {0};
|
||||
struct string_list *str_list = NULL;
|
||||
const char *url = msg_queue_pull(http->msg_queue);
|
||||
|
||||
@ -250,7 +251,7 @@ static int rarch_main_data_http_iterate_transfer(void *data)
|
||||
|
||||
if (percent > 0)
|
||||
{
|
||||
char tmp[PATH_MAX_LENGTH];
|
||||
char tmp[PATH_MAX_LENGTH] = {0};
|
||||
snprintf(tmp, sizeof(tmp), "Download progress: %d%%", percent);
|
||||
data_runloop_osd_msg(tmp, sizeof(tmp));
|
||||
}
|
||||
|
@ -23,7 +23,7 @@
|
||||
void rarch_main_data_overlay_image_upload_iterate(bool is_thread, void *data)
|
||||
{
|
||||
data_runloop_t *runloop = (data_runloop_t*)data;
|
||||
driver_t *driver = driver_get_ptr();
|
||||
driver_t *driver = driver_get_ptr();
|
||||
|
||||
if (rarch_main_is_idle())
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user