mirror of
https://github.com/libretro/RetroArch
synced 2025-03-28 19:20:35 +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) \
|
||||
{ \
|
||||
rarch_setting_t* list_temp = NULL; \
|
||||
\
|
||||
list_size *= 2; \
|
||||
list_temp = (rarch_setting_t*)realloc(list, sizeof(rarch_setting_t) * list_size); \
|
||||
\
|
||||
if (list_temp) \
|
||||
{ \
|
||||
list = list_temp; \
|
||||
} \
|
||||
else \
|
||||
if (!(list_temp = (rarch_setting_t*)realloc(list, sizeof(rarch_setting_t) * list_size))) \
|
||||
{ \
|
||||
RARCH_ERR("Settings list reallocation failed.\n"); \
|
||||
free(list); \
|
||||
list = NULL; \
|
||||
return NULL; \
|
||||
} \
|
||||
list = list_temp; \
|
||||
} \
|
||||
(list[index++]) = VALUE
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user