From c93b9cec6eb1da5e75dee379fce968d858e31190 Mon Sep 17 00:00:00 2001 From: lighta Date: Sun, 8 Jan 2017 15:43:54 -0500 Subject: [PATCH] Small finalisation for ARM va_list issue --- src/map/itemdb.c | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/src/map/itemdb.c b/src/map/itemdb.c index dbdda16cc1..6841df550c 100644 --- a/src/map/itemdb.c +++ b/src/map/itemdb.c @@ -1778,29 +1778,16 @@ static int itemdb_final_sub(DBKey key, DBData *data, va_list ap) /** NOTE: * In some OSs, like Raspbian, we aren't allowed to pass 0 in va_list. * So, itemdb_group_free2 is useful in some cases. +* NB : We keeping that funciton cause that signature is needed for some iterator.. */ static int itemdb_group_free(DBKey key, DBData *data, va_list ap) { - struct s_item_group_db *group = (struct s_item_group_db *)db_data2ptr(data); - uint8 j; - if (!group) - return 0; - if (group->must_qty) - aFree(group->must); - group->must_qty = 0; - for (j = 0; j < MAX_ITEMGROUP_RANDGROUP; j++) { - if (!group->random[j].data_qty || !(&group->random[j])) - continue; - aFree(group->random[j].data); - group->random[j].data_qty = 0; - } - aFree(group); - return 0; + return itemdb_group_free2(key,data); } -/** (Raspberry PI) -* Adaptation of itemdb_group_free. This function enables to run rAthena on Raspbian OS. +/** (ARM) +* Adaptation of itemdb_group_free. This function enables to compile rAthena on Raspbian OS. */ -static int itemdb_group_free2(DBKey key, DBData *data) { +static inline int itemdb_group_free2(DBKey key, DBData *data) { struct s_item_group_db *group = (struct s_item_group_db *)db_data2ptr(data); uint8 j; if (!group)