mirror of
https://github.com/libretro/RetroArch
synced 2025-04-03 01:21:10 +00:00
(Ozone/XMB) Use malloc instead of calloc for file_list
This commit is contained in:
parent
dc35458761
commit
d748b37e6b
menu/drivers
@ -203,7 +203,11 @@ static void *ozone_init(void **userdata, bool video_is_threaded)
|
|||||||
|
|
||||||
gfx_display_allocate_white_texture();
|
gfx_display_allocate_white_texture();
|
||||||
|
|
||||||
ozone->horizontal_list = (file_list_t*)calloc(1, sizeof(file_list_t));
|
ozone->horizontal_list = (file_list_t*)malloc(sizeof(file_list_t));
|
||||||
|
|
||||||
|
ozone->horizontal_list->list = NULL;
|
||||||
|
ozone->horizontal_list->capacity = 0;
|
||||||
|
ozone->horizontal_list->size = 0;
|
||||||
|
|
||||||
if (ozone->horizontal_list)
|
if (ozone->horizontal_list)
|
||||||
ozone_init_horizontal_list(ozone);
|
ozone_init_horizontal_list(ozone);
|
||||||
|
@ -822,12 +822,16 @@ void ozone_refresh_horizontal_list(ozone_handle_t *ozone)
|
|||||||
ozone_free_list_nodes(ozone->horizontal_list, false);
|
ozone_free_list_nodes(ozone->horizontal_list, false);
|
||||||
file_list_free(ozone->horizontal_list);
|
file_list_free(ozone->horizontal_list);
|
||||||
}
|
}
|
||||||
ozone->horizontal_list = NULL;
|
ozone->horizontal_list = NULL;
|
||||||
|
|
||||||
menu_driver_ctl(RARCH_MENU_CTL_SET_PREVENT_POPULATE, NULL);
|
menu_driver_ctl(RARCH_MENU_CTL_SET_PREVENT_POPULATE, NULL);
|
||||||
|
|
||||||
ozone->horizontal_list = (file_list_t*)
|
ozone->horizontal_list = (file_list_t*)
|
||||||
calloc(1, sizeof(file_list_t));
|
malloc(sizeof(file_list_t));
|
||||||
|
|
||||||
|
ozone->horizontal_list->list = NULL;
|
||||||
|
ozone->horizontal_list->capacity = 0;
|
||||||
|
ozone->horizontal_list->size = 0;
|
||||||
|
|
||||||
if (ozone->horizontal_list)
|
if (ozone->horizontal_list)
|
||||||
ozone_init_horizontal_list(ozone);
|
ozone_init_horizontal_list(ozone);
|
||||||
|
@ -2232,12 +2232,16 @@ static void xmb_refresh_horizontal_list(xmb_handle_t *xmb)
|
|||||||
xmb_free_list_nodes(xmb->horizontal_list, false);
|
xmb_free_list_nodes(xmb->horizontal_list, false);
|
||||||
file_list_free(xmb->horizontal_list);
|
file_list_free(xmb->horizontal_list);
|
||||||
}
|
}
|
||||||
xmb->horizontal_list = NULL;
|
xmb->horizontal_list = NULL;
|
||||||
|
|
||||||
menu_driver_ctl(RARCH_MENU_CTL_SET_PREVENT_POPULATE, NULL);
|
menu_driver_ctl(RARCH_MENU_CTL_SET_PREVENT_POPULATE, NULL);
|
||||||
|
|
||||||
xmb->horizontal_list = (file_list_t*)
|
xmb->horizontal_list = (file_list_t*)
|
||||||
calloc(1, sizeof(file_list_t));
|
malloc(sizeof(file_list_t));
|
||||||
|
|
||||||
|
xmb->horizontal_list->list = NULL;
|
||||||
|
xmb->horizontal_list->capacity = 0;
|
||||||
|
xmb->horizontal_list->size = 0;
|
||||||
|
|
||||||
if (xmb->horizontal_list)
|
if (xmb->horizontal_list)
|
||||||
xmb_init_horizontal_list(xmb);
|
xmb_init_horizontal_list(xmb);
|
||||||
@ -5395,11 +5399,16 @@ static void *xmb_init(void **userdata, bool video_is_threaded)
|
|||||||
|
|
||||||
*userdata = xmb;
|
*userdata = xmb;
|
||||||
|
|
||||||
xmb->selection_buf_old = (file_list_t*)calloc(1, sizeof(file_list_t));
|
xmb->selection_buf_old = (file_list_t*)
|
||||||
|
malloc(sizeof(file_list_t));
|
||||||
|
|
||||||
if (!xmb->selection_buf_old)
|
if (!xmb->selection_buf_old)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
|
xmb->selection_buf_old->list = NULL;
|
||||||
|
xmb->selection_buf_old->capacity = 0;
|
||||||
|
xmb->selection_buf_old->size = 0;
|
||||||
|
|
||||||
xmb->categories_active_idx = 0;
|
xmb->categories_active_idx = 0;
|
||||||
xmb->categories_active_idx_old = 0;
|
xmb->categories_active_idx_old = 0;
|
||||||
xmb->x = 0;
|
xmb->x = 0;
|
||||||
@ -5448,7 +5457,11 @@ static void *xmb_init(void **userdata, bool video_is_threaded)
|
|||||||
|
|
||||||
gfx_display_allocate_white_texture();
|
gfx_display_allocate_white_texture();
|
||||||
|
|
||||||
xmb->horizontal_list = (file_list_t*)calloc(1, sizeof(file_list_t));
|
xmb->horizontal_list = (file_list_t*)malloc(sizeof(file_list_t));
|
||||||
|
|
||||||
|
xmb->horizontal_list->list = NULL;
|
||||||
|
xmb->horizontal_list->capacity = 0;
|
||||||
|
xmb->horizontal_list->size = 0;
|
||||||
|
|
||||||
if (xmb->horizontal_list)
|
if (xmb->horizontal_list)
|
||||||
xmb_init_horizontal_list(xmb);
|
xmb_init_horizontal_list(xmb);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user