diff options
author | Lance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-08-27 06:38:17 +0000 |
---|---|---|
committer | Lance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-08-27 06:38:17 +0000 |
commit | 3c8999edce9e1f0d5c0dee3ff8311e781d64c684 (patch) | |
tree | d066567a720e5fad02e6f857d55bc165d9a3809a /src/map/guild.c | |
parent | ea320701794515d4ffa6a8e8ff8f3b8fdfe09860 (diff) | |
download | hercules-3c8999edce9e1f0d5c0dee3ff8311e781d64c684.tar.gz hercules-3c8999edce9e1f0d5c0dee3ff8311e781d64c684.tar.bz2 hercules-3c8999edce9e1f0d5c0dee3ff8311e781d64c684.tar.xz hercules-3c8999edce9e1f0d5c0dee3ff8311e781d64c684.zip |
* Optional macro MEMSET_TURBO for faster low-level memory initializations.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8499 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/guild.c')
-rw-r--r-- | src/map/guild.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/map/guild.c b/src/map/guild.c index ff972ffd9..de23c4254 100644 --- a/src/map/guild.c +++ b/src/map/guild.c @@ -94,7 +94,7 @@ int guild_read_guildskill_tree_db(void) FILE *fp;
char line[1024],*p;
- memset(guild_skill_tree,0,sizeof(guild_skill_tree));
+ malloc_set(guild_skill_tree,0,sizeof(guild_skill_tree));
sprintf(line, "%s/guild_skill_tree.txt", db_path);
if( (fp=fopen(line,"r"))==NULL){
ShowError("can't read %s\n", line);
@@ -170,7 +170,7 @@ static int guild_read_castledb(void) while(fgets(line,1020,fp)){
if(line[0]=='/' && line[1]=='/')
continue;
- memset(str,0,sizeof(str));
+ malloc_tsetdword(str,0,sizeof(str));
for(j=0,p=line;j<6 && p;j++){
str[j]=p;
p=strchr(p,',');
@@ -325,7 +325,7 @@ void guild_makemember(struct guild_member *m,struct map_session_data *sd) {
nullpo_retv(sd);
- memset(m,0,sizeof(struct guild_member));
+ malloc_set(m,0,sizeof(struct guild_member));
m->account_id =sd->status.account_id;
m->char_id =sd->status.char_id;
m->hair =sd->status.hair;
@@ -816,7 +816,7 @@ int guild_expulsion(struct map_session_data *sd,int guild_id, intif_guild_leave(g->guild_id,account_id,char_id,1,mes);
//It's wrong way, member info will erased later
//see guild_member_leaved [LuzZza]
- //memset(&g->member[i],0,sizeof(struct guild_member));
+ //malloc_set(&g->member[i],0,sizeof(struct guild_member));
return 0;
}
}
@@ -846,7 +846,7 @@ int guild_member_leaved(int guild_id,int account_id,int char_id,int flag, else
clif_guild_expulsion(online_member_sd, name, mes, account_id);
- memset(&g->member[i],0,sizeof(struct guild_member));
+ malloc_set(&g->member[i],0,sizeof(struct guild_member));
clif_guild_memberlist(online_member_sd);
if(sd != NULL && sd->status.guild_id == guild_id) {
|