mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 13:20:30 +00:00
rarch_main_data_nbio_iterate_poll - get rid of implicit memset
This commit is contained in:
parent
c9a3caeca5
commit
6b261aad87
@ -497,7 +497,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)
|
static int rarch_main_data_nbio_iterate_poll(nbio_handle_t *nbio)
|
||||||
{
|
{
|
||||||
char elem0[PATH_MAX_LENGTH] = {0};
|
char elem0[PATH_MAX_LENGTH];
|
||||||
|
unsigned elem0_hash = 0;
|
||||||
uint32_t cb_type_hash = 0;
|
uint32_t cb_type_hash = 0;
|
||||||
struct nbio_t* handle = NULL;
|
struct nbio_t* handle = NULL;
|
||||||
struct string_list *str_list = NULL;
|
struct string_list *str_list = NULL;
|
||||||
@ -517,26 +518,23 @@ static int rarch_main_data_nbio_iterate_poll(nbio_handle_t *nbio)
|
|||||||
|
|
||||||
str_list = string_split(path, "|");
|
str_list = string_split(path, "|");
|
||||||
|
|
||||||
if (!str_list)
|
if (!str_list || (str_list->size < 1))
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
if (str_list->size > 0)
|
strlcpy(elem0, str_list->elems[0].data, sizeof(elem0));
|
||||||
{
|
elem0_hash = djb2_calculate(elem0);
|
||||||
unsigned elem0_hash = 0;
|
|
||||||
strlcpy(elem0, str_list->elems[0].data, sizeof(elem0));
|
|
||||||
elem0_hash = djb2_calculate(elem0);
|
|
||||||
|
|
||||||
/* TODO/FIXME - should be able to deal with this
|
/* TODO/FIXME - should be able to deal with this
|
||||||
* in a better way. */
|
* in a better way. */
|
||||||
switch(elem0_hash)
|
switch(elem0_hash)
|
||||||
{
|
{
|
||||||
case CB_MENU_WALLPAPER:
|
case CB_MENU_WALLPAPER:
|
||||||
case CB_MENU_BOXART:
|
case CB_MENU_BOXART:
|
||||||
goto error;
|
goto error;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (str_list->size > 1)
|
if (str_list->size > 1)
|
||||||
cb_type_hash = djb2_calculate(str_list->elems[1].data);
|
cb_type_hash = djb2_calculate(str_list->elems[1].data);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user