summaryrefslogtreecommitdiff
path: root/src/map/guild.c
diff options
context:
space:
mode:
authorLance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-04-29 04:00:19 +0000
committerLance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-04-29 04:00:19 +0000
commit4db583138b9556f72b13df7f66eeeace6a67ce3e (patch)
tree72b6589e9f7a0e46e2aa459cd6272bb90bfe7e96 /src/map/guild.c
parent525aa7d56ec5d74eac548d948782330d02df8f3e (diff)
downloadhercules-4db583138b9556f72b13df7f66eeeace6a67ce3e.tar.gz
hercules-4db583138b9556f72b13df7f66eeeace6a67ce3e.tar.bz2
hercules-4db583138b9556f72b13df7f66eeeace6a67ce3e.tar.xz
hercules-4db583138b9556f72b13df7f66eeeace6a67ce3e.zip
* Using malloc for memory allocations that doesn't need to be pre-initialized.
* Eliminated initializations for pointers returned by calloc. * Moved grfio_final to do_init since it's not used after server boot. * Optimized scripts to return CONSTSTR instead of allocating memory just to return a constant string. Some buildin functions still need work. * Disabled graph since it doesn't work yet. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6355 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/guild.c')
-rw-r--r--src/map/guild.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/map/guild.c b/src/map/guild.c
index dc059bb40..0c71ee293 100644
--- a/src/map/guild.c
+++ b/src/map/guild.c
@@ -482,7 +482,7 @@ int guild_npc_request_info(int guild_id,const char *event)
if(event==NULL || *event==0)
return guild_request_info(guild_id);
- ev=(struct eventlist *)aCalloc(1,sizeof(struct eventlist));
+ ev=(struct eventlist *)aMalloc(sizeof(struct eventlist));
memcpy(ev->name,event,strlen(event));
//The one in the db becomes the next event from this.
ev->next=idb_put(guild_infoevent_db,guild_id,ev);
@@ -1680,7 +1680,7 @@ int guild_addcastleinfoevent(int castle_id,int index,const char *name)
if( name==NULL || *name==0 )
return 0;
- ev=(struct eventlist *)aCalloc(1,sizeof(struct eventlist));
+ ev=(struct eventlist *)aMalloc(sizeof(struct eventlist));
memcpy(ev->name,name,sizeof(ev->name));
//The next event becomes whatever was currently stored.
ev->next= idb_put(guild_castleinfoevent_db,code,ev);
@@ -1904,7 +1904,7 @@ int guild_agit_break(struct mob_data *md)
nullpo_retr(0, md);
- evname=(char *)aCallocA(strlen(md->npc_event) + 1, sizeof(char));
+ evname=(char *)aMallocA((strlen(md->npc_event) + 1)*sizeof(char));
strcpy(evname,md->npc_event);
// Now By User to Run [OnAgitBreak] NPC Event...