(xmb.c) Correct faulty usage of calloc
This commit is contained in:
parent
0cc56e2a1a
commit
6db07f7fd8
|
@ -128,7 +128,7 @@ typedef struct rarch_sinc_resampler
|
|||
static void init_sinc_table(rarch_sinc_resampler_t *resamp, double cutoff,
|
||||
float *phase_table, int phases, int taps, bool calculate_delta)
|
||||
{
|
||||
int i, j, p;
|
||||
int i, j;
|
||||
double window_mod = window_function(0.0); /* Need to normalize w(0) to 1.0. */
|
||||
int stride = calculate_delta ? 2 : 1;
|
||||
double sidelobes = taps / 2.0;
|
||||
|
@ -153,6 +153,7 @@ static void init_sinc_table(rarch_sinc_resampler_t *resamp, double cutoff,
|
|||
if (calculate_delta)
|
||||
{
|
||||
int phase;
|
||||
unsigned p;
|
||||
|
||||
for (p = 0; p < phases - 1; p++)
|
||||
{
|
||||
|
|
|
@ -2359,14 +2359,14 @@ static void xmb_list_deep_copy(menu_handle_t *menu, const file_list_t *src, file
|
|||
|
||||
if (src_udata)
|
||||
{
|
||||
void *data = calloc(sizeof(xmb_node_t), 1);
|
||||
void *data = calloc(1, sizeof(xmb_node_t));
|
||||
memcpy(data, src_udata, sizeof(xmb_node_t));
|
||||
file_list_set_userdata(dst, i, data);
|
||||
}
|
||||
|
||||
if (src_adata)
|
||||
{
|
||||
void *data = calloc(sizeof(menu_file_list_cbs_t), 1);
|
||||
void *data = calloc(1, sizeof(menu_file_list_cbs_t));
|
||||
memcpy(data, src_adata, sizeof(menu_file_list_cbs_t));
|
||||
file_list_set_actiondata(dst, i, data);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue