summaryrefslogtreecommitdiff
path: root/src/map/atcommand.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/atcommand.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/atcommand.c')
-rw-r--r--src/map/atcommand.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 90069f409..686d03c87 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -889,7 +889,7 @@ int msg_config_read(const char *cfgName) {
if (msg_number >= 0 && msg_number < MAX_MSG) {
if (msg_table[msg_number] != NULL)
aFree(msg_table[msg_number]);
- msg_table[msg_number] = (char *)aCalloc(strlen(w2) + 1, sizeof (char));
+ msg_table[msg_number] = (char *)aMalloc((strlen(w2) + 1)*sizeof (char));
strcpy(msg_table[msg_number],w2);
// printf("message #%d: '%s'.\n", msg_number, msg_table[msg_number]);
}
@@ -1951,8 +1951,8 @@ int atcommand_whozeny(
clif_displaymessage(fd, msg_table[28]); // No player found.
return 0;
}
- zeny = (int *)aCallocA(users, sizeof(int));
- counted = (int *)aCallocA(users, sizeof(int));
+ zeny = (int *)aMallocA(users*sizeof(int));
+ counted = (int *)aMallocA(users*sizeof(int));
for (i = 0; i < users; i++) {
if ((pl_sd = pl_allsd[i])) {
memcpy(player_name, pl_sd->status.name, NAME_LENGTH);