summaryrefslogtreecommitdiff
path: root/src/map/pet.c
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-01-07 16:49:03 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-01-07 16:49:03 +0000
commitb795233e374987f4c427f59922f271810f937eef (patch)
tree047fafbeb99c4b12bcaadf046854af54e85dcad0 /src/map/pet.c
parentf4a6909849243c3e4776ddee4de962224e80ac9a (diff)
downloadhercules-b795233e374987f4c427f59922f271810f937eef.tar.gz
hercules-b795233e374987f4c427f59922f271810f937eef.tar.bz2
hercules-b795233e374987f4c427f59922f271810f937eef.tar.xz
hercules-b795233e374987f4c427f59922f271810f937eef.zip
Undid the memset->malloc_set replacement
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9626 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pet.c')
-rw-r--r--src/map/pet.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/map/pet.c b/src/map/pet.c
index 50433aab3..06ca24049 100644
--- a/src/map/pet.c
+++ b/src/map/pet.c
@@ -343,7 +343,7 @@ static int pet_return_egg(struct map_session_data *sd, struct pet_data *pd)
int flag;
pet_lootitem_drop(pd,sd);
- malloc_set(&tmp_item,0,sizeof(tmp_item));
+ memset(&tmp_item,0,sizeof(tmp_item));
tmp_item.nameid = pd->petDB->EggID;
tmp_item.identify = 1;
tmp_item.card[0] = CARD0_PET;
@@ -634,7 +634,7 @@ int pet_get_egg(int account_id,int pet_id,int flag)
return 0;
}
- malloc_set(&tmp_item,0,sizeof(tmp_item));
+ memset(&tmp_item,0,sizeof(tmp_item));
tmp_item.nameid = pet_db[i].EggID;
tmp_item.identify = 1;
tmp_item.card[0] = CARD0_PET;
@@ -762,7 +762,7 @@ static int pet_unequipitem(struct map_session_data *sd, struct pet_data *pd)
pd->pet.equip = 0;
status_set_viewdata(&pd->bl, pd->pet.class_);
clif_pet_equip(pd);
- malloc_set(&tmp_item,0,sizeof(tmp_item));
+ memset(&tmp_item,0,sizeof(tmp_item));
tmp_item.nameid = nameid;
tmp_item.identify = 1;
if((flag = pc_additem(sd,&tmp_item,1))) {
@@ -1089,7 +1089,7 @@ int pet_lootitem_drop(struct pet_data *pd,struct map_session_data *sd)
}
}
//The smart thing to do is use pd->loot->max (thanks for pointing it out, Shinomori)
- malloc_set(pd->loot->item,0,pd->loot->max * sizeof(struct item));
+ memset(pd->loot->item,0,pd->loot->max * sizeof(struct item));
pd->loot->count = 0;
pd->loot->weight = 0;
pd->ud.canact_tick = gettick()+10000; // 10*1000msの間拾わない
@@ -1288,7 +1288,7 @@ int read_petdb()
pet_db[j].script = NULL;
}
j = 0;
- malloc_set(pet_db,0,sizeof(pet_db));
+ memset(pet_db,0,sizeof(pet_db));
for(i=0;i<2;i++){
sprintf(line, "%s/%s", db_path, filename[i]);
fp=fopen(line,"r");
@@ -1368,7 +1368,7 @@ int read_petdb()
*/
int do_init_pet(void)
{
- malloc_set(pet_db,0,sizeof(pet_db));
+ memset(pet_db,0,sizeof(pet_db));
read_petdb();
item_drop_ers = ers_new(sizeof(struct item_drop));