mirror of
https://github.com/libretro/RetroArch
synced 2025-03-31 10:20:41 +00:00
(settings_data.c) Simplify APPEND macro
This commit is contained in:
parent
c7d176f02b
commit
cd2acaaec6
@ -2128,21 +2128,16 @@ static void general_write_handler(void *data)
|
|||||||
if (index == list_size) \
|
if (index == list_size) \
|
||||||
{ \
|
{ \
|
||||||
rarch_setting_t* list_temp = NULL; \
|
rarch_setting_t* list_temp = NULL; \
|
||||||
\
|
|
||||||
list_size *= 2; \
|
list_size *= 2; \
|
||||||
list_temp = (rarch_setting_t*)realloc(list, sizeof(rarch_setting_t) * list_size); \
|
|
||||||
\
|
\
|
||||||
if (list_temp) \
|
if (!(list_temp = (rarch_setting_t*)realloc(list, sizeof(rarch_setting_t) * list_size))) \
|
||||||
{ \
|
|
||||||
list = list_temp; \
|
|
||||||
} \
|
|
||||||
else \
|
|
||||||
{ \
|
{ \
|
||||||
RARCH_ERR("Settings list reallocation failed.\n"); \
|
RARCH_ERR("Settings list reallocation failed.\n"); \
|
||||||
free(list); \
|
free(list); \
|
||||||
list = NULL; \
|
list = NULL; \
|
||||||
return NULL; \
|
return NULL; \
|
||||||
} \
|
} \
|
||||||
|
list = list_temp; \
|
||||||
} \
|
} \
|
||||||
(list[index++]) = VALUE
|
(list[index++]) = VALUE
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user