diff options
author | celest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2005-03-07 16:01:20 +0000 |
---|---|---|
committer | celest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2005-03-07 16:01:20 +0000 |
commit | 41ca5bd82328576e84d19923b5cfda6d7b218e9f (patch) | |
tree | 70336a3f3541630903a9a42c5834f1b5901c1462 /src/map | |
parent | ec11a6a46dcb98508758d0fb96d18194f28450c5 (diff) | |
download | hercules-41ca5bd82328576e84d19923b5cfda6d7b218e9f.tar.gz hercules-41ca5bd82328576e84d19923b5cfda6d7b218e9f.tar.bz2 hercules-41ca5bd82328576e84d19923b5cfda6d7b218e9f.tar.xz hercules-41ca5bd82328576e84d19923b5cfda6d7b218e9f.zip |
Replaced some free's with aFree
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@1208 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/log.h | 2 | ||||
-rw-r--r-- | src/map/map.c | 28 | ||||
-rw-r--r-- | src/map/npc.c | 2 | ||||
-rw-r--r-- | src/map/pc.c | 4 | ||||
-rw-r--r-- | src/map/pet.c | 2 | ||||
-rw-r--r-- | src/map/script.c | 2 | ||||
-rw-r--r-- | src/map/skill.c | 2 |
7 files changed, 22 insertions, 20 deletions
diff --git a/src/map/log.h b/src/map/log.h index 7130a8f6a..9886329da 100644 --- a/src/map/log.h +++ b/src/map/log.h @@ -29,6 +29,8 @@ extern struct Log_Config { int branch, drop, mvpdrop, present, produce, refine, trade, vend, zeny, gm, npc; char log_branch[32], log_drop[32], log_mvpdrop[32], log_present[32], log_produce[32], log_refine[32], log_trade[32], log_vend[32], log_gm[32], log_npc[32]; char log_branch_db[32], log_drop_db[32], log_mvpdrop_db[32], log_present_db[32], log_produce_db[32], log_refine_db[32], log_trade_db[32], log_vend_db[32], log_gm_db[32], log_npc_db[32]; + int uptime; + char log_uptime[32]; } log_config; #endif diff --git a/src/map/map.c b/src/map/map.c index f241c5fec..ae9933b11 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -1544,14 +1544,14 @@ int map_quit(struct map_session_data *sd) { void *p = numdb_search(charid_db,sd->status.char_id); if(p) { numdb_erase(charid_db,sd->status.char_id); - free(p); + aFree(p); } } strdb_erase(nick_db,sd->status.name); numdb_erase(charid_db,sd->status.char_id); numdb_erase(id_db,sd->bl.id); - free(sd->reg); - free(sd->regstr); + aFree(sd->reg); + aFree(sd->regstr); return 0; } @@ -1953,7 +1953,7 @@ int map_setipport(char *name,unsigned long ip,int port) { } else { // 読み込んでいるので置き換える md = mdos->map; - free(mdos); + aFree(mdos); strdb_insert(map_db,md->name,md); } } else { @@ -1973,7 +1973,7 @@ int map_eraseallipport_sub(void *key,void *data,va_list va) { struct map_data_other_server *mdos = (struct map_data_other_server*)data; if(mdos->gat == NULL && mdos->map == NULL) { strdb_erase(map_db,key); - free(mdos); + aFree(mdos); } return 0; } @@ -2005,7 +2005,7 @@ int map_eraseipport(char *name,unsigned long ip,int port) return 1; // 呼び出し元で chrif_sendmap() をする } else { strdb_erase(map_db,name); - free(mdos); + aFree(mdos); } // if(battle_config.etc_log) // printf("erase map %s %d.%d.%d.%d:%d\n",name,p[0],p[1],p[2],p[3],port); @@ -2179,7 +2179,7 @@ int map_cache_read(struct map_data *m) return 1; } else { // なぜかファイル後半が欠けてるので読み直し - m->xs = 0; m->ys = 0; m->gat = NULL; free(m->gat); + m->xs = 0; m->ys = 0; m->gat = NULL; aFree(m->gat); return 0; } } else if(map_cache.map[i].compressed == 1) { @@ -2195,19 +2195,19 @@ int map_cache_read(struct map_data *m) if(fread(buf,1,size_compress,map_cache.fp) != size_compress) { // なぜかファイル後半が欠けてるので読み直し printf("fread error\n"); - free(m->gat); m->xs = 0; m->ys = 0; m->gat = NULL; - free(buf); + aFree(m->gat); m->xs = 0; m->ys = 0; m->gat = NULL; + aFree(buf); return 0; } dest_len = m->xs * m->ys; decode_zip(m->gat,&dest_len,buf,size_compress); if(dest_len != map_cache.map[i].xs * map_cache.map[i].ys) { // 正常に解凍が出来てない - free(m->gat); m->xs = 0; m->ys = 0; m->gat = NULL; - free(buf); + aFree(m->gat); m->xs = 0; m->ys = 0; m->gat = NULL; + aFree(buf); return 0; } - free(buf); + aFree(buf); return 1; } } @@ -2262,7 +2262,7 @@ static int map_cache_write(struct map_data *m) map_cache.map[i].water_height = map_waterheight(m->name); map_cache.dirty = 1; if(map_read_flag == 2) { - free(write_buf); + aFree(write_buf); } return 0; } @@ -2293,7 +2293,7 @@ static int map_cache_write(struct map_data *m) map_cache.head.filesize += len_new; map_cache.dirty = 1; if(map_read_flag == 2) { - free(write_buf); + aFree(write_buf); } return 0; } diff --git a/src/map/npc.c b/src/map/npc.c index 89837da77..7634c0d0b 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -1889,7 +1889,7 @@ static int npc_parse_script(char *w1,char *w2,char *w3,char *w4,char *first_line ev2 = strdb_search(ev_db,buf); if(ev2 != NULL) { printf("npc_parse_script : duplicate event %s\n",buf); - free(ev2); + aFree(ev2); } strdb_insert(ev_db,buf,ev); } diff --git a/src/map/pc.c b/src/map/pc.c index 282aa79c4..866ef969c 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -5849,7 +5849,7 @@ int pc_deleventtimer(struct map_session_data *sd,const char *name) delete_timer(sd->eventtimer[i],pc_eventtimer); sd->eventtimer[i]=-1; sd->eventcount--; - free(p); + aFree(p); break; } } @@ -5895,7 +5895,7 @@ int pc_cleareventtimer(struct map_session_data *sd) char *p = (char *)(get_timer(sd->eventtimer[i])->data); delete_timer(sd->eventtimer[i],pc_eventtimer); sd->eventtimer[i]=-1; - free(p); + aFree(p); } return 0; diff --git a/src/map/pet.c b/src/map/pet.c index c48f92970..6ec18422c 100644 --- a/src/map/pet.c +++ b/src/map/pet.c @@ -1682,7 +1682,7 @@ int do_final_pet(void) { int i; for(i = 0;i < MAX_PET_DB; i++) { if(pet_db[i].script) { - free(pet_db[i].script); + aFree(pet_db[i].script); } } return 0; diff --git a/src/map/script.c b/src/map/script.c index 201635b8f..35964f3bc 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -6333,7 +6333,7 @@ int buildin_select(struct script_state *st) strcat(buf,":"); } clif_scriptmenu(script_rid2sd(st),st->oid,buf); - free(buf); + aFree(buf); } else if(sd->npc_menu==0xff){ // cansel sd->state.menu_or_input=0; st->state=END; diff --git a/src/map/skill.c b/src/map/skill.c index a8e158c71..6b95d391e 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -8565,7 +8565,7 @@ int skill_unit_move_unit_group( struct skill_unit_group *group, int m,int dx,int &unit1->bl,tick,1); } } - free(m_flag); + aFree(m_flag); return 0; } |