From 2c5fabbc0b492cb5456e670ce9eb2352a11d5e3b Mon Sep 17 00:00:00 2001 From: "(no author)" <(no author)@54d463be-8e91-2dee-dedb-b68131a5f0ec> Date: Sun, 23 Jan 2005 20:38:44 +0000 Subject: update git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@968 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/char/int_storage.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/char/int_storage.c') diff --git a/src/char/int_storage.c b/src/char/int_storage.c index 7a4022a55..73d50f323 100644 --- a/src/char/int_storage.c +++ b/src/char/int_storage.c @@ -192,7 +192,7 @@ struct storage *account2storage(int account_id) struct storage *s; s=numdb_search(storage_db,account_id); if(s == NULL) { - s = calloc(sizeof(struct storage), 1); + s = aCalloc(sizeof(struct storage), 1); if(s==NULL){ printf("int_storage: out of memory!\n"); exit(0); @@ -210,7 +210,7 @@ struct guild_storage *guild2storage(int guild_id) if(inter_guild_search(guild_id) != NULL) { gs=numdb_search(guild_storage_db,guild_id); if(gs == NULL) { - gs = calloc(sizeof(struct guild_storage), 1); + gs = aCalloc(sizeof(struct guild_storage), 1); if(gs==NULL){ printf("int_storage: out of memory!\n"); exit(0); @@ -242,7 +242,7 @@ int inter_storage_init() } while(fgets(line,65535,fp)){ sscanf(line,"%d",&tmp_int); - s=calloc(sizeof(struct storage), 1); + s=aCalloc(sizeof(struct storage), 1); if(s==NULL){ printf("int_storage: out of memory!\n"); exit(0); @@ -254,7 +254,7 @@ int inter_storage_init() } else{ printf("int_storage: broken data [%s] line %d\n",storage_txt,c); - free(s); + aFree(s); } c++; } @@ -270,7 +270,7 @@ int inter_storage_init() } while(fgets(line,65535,fp)){ sscanf(line,"%d",&tmp_int); - gs=calloc(sizeof(struct guild_storage), 1); + gs=aCalloc(sizeof(struct guild_storage), 1); if(gs==NULL){ printf("int_storage: out of memory!\n"); exit(0); @@ -282,7 +282,7 @@ int inter_storage_init() } else{ printf("int_storage: broken data [%s] line %d\n",guild_storage_txt,c); - free(gs); + aFree(gs); } c++; } @@ -356,7 +356,7 @@ int inter_storage_delete(int account_id) inter_pet_delete(*((long *)(&s->storage[i].card[2]))); } numdb_erase(storage_db,account_id); - free(s); + aFree(s); } return 0; } @@ -372,7 +372,7 @@ int inter_guild_storage_delete(int guild_id) inter_pet_delete(*((long *)(&gs->storage[i].card[2]))); } numdb_erase(guild_storage_db,guild_id); - free(gs); + aFree(gs); } return 0; } -- cgit v1.2.3-60-g2f50