summaryrefslogtreecommitdiff
path: root/src/map/storage.c
diff options
context:
space:
mode:
authoramber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-03-29 16:46:19 +0000
committeramber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-03-29 16:46:19 +0000
commitec35f4b8bce178430219c484566a8dceea015221 (patch)
tree8ce50b81edebc57c308a00bccecbe066aa0fdcb0 /src/map/storage.c
parent51079611e59264b02fdbb4beb0d3675cc64618e6 (diff)
downloadhercules-ec35f4b8bce178430219c484566a8dceea015221.tar.gz
hercules-ec35f4b8bce178430219c484566a8dceea015221.tar.bz2
hercules-ec35f4b8bce178430219c484566a8dceea015221.tar.xz
hercules-ec35f4b8bce178430219c484566a8dceea015221.zip
More C/C++ Conformance fixes
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@1334 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/storage.c')
-rw-r--r--src/map/storage.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/map/storage.c b/src/map/storage.c
index c9f4ffd62..6c4d6bea7 100644
--- a/src/map/storage.c
+++ b/src/map/storage.c
@@ -67,13 +67,13 @@ int do_init_storage(void) // map.c::do_init()から呼ばれる
}
static int guild_storage_db_final(void *key,void *data,va_list ap)
{
- struct guild_storage *gstor=data;
+ struct guild_storage *gstor=(struct guild_storage *) data;
aFree(gstor);
return 0;
}
static int storage_db_final(void *key,void *data,va_list ap)
{
- struct storage *stor=data;
+ struct storage *stor=(struct storage *) data;
aFree(stor);
return 0;
}
@@ -88,9 +88,9 @@ void do_final_storage(void) // by [MC Cameri]
struct storage *account2storage(int account_id)
{
struct storage *stor;
- stor=numdb_search(storage_db,account_id);
+ stor=(struct storage *) numdb_search(storage_db,account_id);
if(stor == NULL) {
- stor = aCallocA(sizeof(struct storage), 1);
+ stor = (struct storage *) aCallocA(sizeof(struct storage), 1);
if(stor == NULL){
printf("storage: out of memory!\n");
exit(0);
@@ -104,12 +104,12 @@ struct storage *account2storage(int account_id)
// Just to ask storage, without creation
struct storage *account2storage2(int account_id) {
- return numdb_search(storage_db, account_id);
+ return (struct storage *) numdb_search(storage_db, account_id);
}
int storage_delete(int account_id)
{
- struct storage *stor = numdb_search(storage_db,account_id);
+ struct storage *stor = (struct storage *) numdb_search(storage_db,account_id);
if(stor) {
numdb_erase(storage_db,account_id);
aFree(stor);
@@ -131,7 +131,7 @@ int storage_storageopen(struct map_session_data *sd)
clif_displaymessage(sd->fd, msg_txt(246));
return 1;
}
- if((stor = numdb_search(storage_db,sd->status.account_id)) != NULL) {
+ if((stor = (struct storage *) numdb_search(storage_db,sd->status.account_id)) != NULL) {
if (stor->storage_status == 0) {
stor->storage_status = 1;
sd->state.storage_flag = 0;
@@ -348,7 +348,7 @@ int storage_storage_quit(struct map_session_data *sd)
nullpo_retr(0, sd);
- stor = numdb_search(storage_db,sd->status.account_id);
+ stor = (struct storage *) numdb_search(storage_db,sd->status.account_id);
if(stor) {
stor->storage_status = 0;
storage_storage_save(sd);
@@ -361,7 +361,7 @@ void storage_storage_dirty(struct map_session_data *sd)
{
struct storage *stor;
- stor=numdb_search(storage_db,sd->status.account_id);
+ stor=(struct storage *) numdb_search(storage_db,sd->status.account_id);
if(stor)
stor->dirty = 1;
@@ -373,7 +373,7 @@ int storage_storage_save(struct map_session_data *sd)
nullpo_retr(0, sd);
- stor=numdb_search(storage_db,sd->status.account_id);
+ stor=(struct storage *) numdb_search(storage_db,sd->status.account_id);
if(stor && stor->dirty) {
intif_send_storage(stor);
stor->dirty = 0;
@@ -386,9 +386,9 @@ struct guild_storage *guild2storage(int guild_id)
{
struct guild_storage *gs = NULL;
if(guild_search(guild_id) != NULL) {
- gs=numdb_search(guild_storage_db,guild_id);
+ gs=(struct guild_storage *) numdb_search(guild_storage_db,guild_id);
if(gs == NULL) {
- gs = aCallocA(sizeof(struct guild_storage), 1);
+ gs = (struct guild_storage *) aCallocA(sizeof(struct guild_storage), 1);
if(gs==NULL){
printf("storage: out of memory!\n");
exit(0);
@@ -402,7 +402,7 @@ struct guild_storage *guild2storage(int guild_id)
int guild_storage_delete(int guild_id)
{
- struct guild_storage *gstor = numdb_search(guild_storage_db,guild_id);
+ struct guild_storage *gstor = (struct guild_storage *) numdb_search(guild_storage_db,guild_id);
if(gstor) {
numdb_erase(guild_storage_db,guild_id);
aFree(gstor);
@@ -418,7 +418,7 @@ int storage_guild_storageopen(struct map_session_data *sd)
if(sd->status.guild_id <= 0)
return 2;
- if((gstor = numdb_search(guild_storage_db,sd->status.guild_id)) != NULL) {
+ if((gstor = (struct guild_storage *) numdb_search(guild_storage_db,sd->status.guild_id)) != NULL) {
if(gstor->storage_status)
return 1;
gstor->storage_status = 1;
@@ -608,7 +608,7 @@ int storage_guild_storage_quit(struct map_session_data *sd,int flag)
nullpo_retr(0, sd);
- stor = numdb_search(guild_storage_db,sd->status.guild_id);
+ stor = (struct guild_storage *) numdb_search(guild_storage_db,sd->status.guild_id);
if(stor) {
if(!flag)
intif_send_guild_storage(sd->status.account_id,stor);