Skip to content

Commit

Permalink
Small finalisation for ARM va_list issue
Browse files Browse the repository at this point in the history
  • Loading branch information
lighta committed Jan 8, 2017
1 parent 755329f commit c93b9ce
Showing 1 changed file with 5 additions and 18 deletions.
23 changes: 5 additions & 18 deletions src/map/itemdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c93b9ce

Please sign in to comment.