summaryrefslogtreecommitdiff
path: root/src/map/intif.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2014-01-12 19:02:37 +0100
committerHaru <haru@dotalux.com>2014-01-12 19:08:40 +0100
commitcd1d0867a006f6a6eb4330142ad3006d37e20684 (patch)
treef84f6840a4170fe606af5af6e30ed62a3a3225a4 /src/map/intif.c
parentfbd5113e258bd511f948d3d583845d89ac8ec216 (diff)
downloadhercules-cd1d0867a006f6a6eb4330142ad3006d37e20684.tar.gz
hercules-cd1d0867a006f6a6eb4330142ad3006d37e20684.tar.bz2
hercules-cd1d0867a006f6a6eb4330142ad3006d37e20684.tar.xz
hercules-cd1d0867a006f6a6eb4330142ad3006d37e20684.zip
Changed some void* to the correct data types where applicable
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/intif.c')
-rw-r--r--src/map/intif.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/map/intif.c b/src/map/intif.c
index 9d447b9c0..49fbe4721 100644
--- a/src/map/intif.c
+++ b/src/map/intif.c
@@ -288,7 +288,7 @@ int intif_saveregistry(struct map_session_data *sd) {
iter = db_iterator(sd->var_db);
for( data = iter->first(iter,&key); iter->exists(iter); data = iter->next(iter,&key) ) {
const char *varname = NULL;
- void *src = NULL;
+ struct script_reg_state *src = NULL;
if( data->type != DB_DATA_PTR ) /* its a @number */
continue;
@@ -301,10 +301,10 @@ int intif_saveregistry(struct map_session_data *sd) {
src = DB->data2ptr(data);
/* no need! */
- if( !((struct script_reg_state*)src)->update )
+ if( !src->update )
continue;
- ((struct script_reg_state*)src)->update = false;
+ src->update = false;
len = strlen(varname)+1;
@@ -317,8 +317,8 @@ int intif_saveregistry(struct map_session_data *sd) {
WFIFOL(inter_fd, plen) = script_getvaridx(key.i64);
plen += 4;
- if( ((struct script_reg_state*)src)->type ) {
- struct script_reg_str *p = src;
+ if( src->type ) {
+ struct script_reg_str *p = (struct script_reg_str *)src;
WFIFOB(inter_fd, plen) = p->value ? 2 : 3;
plen += 1;
@@ -336,7 +336,7 @@ int intif_saveregistry(struct map_session_data *sd) {
}
} else {
- struct script_reg_num *p = src;
+ struct script_reg_num *p = (struct script_reg_num *)src;
WFIFOB(inter_fd, plen) = p->value ? 0 : 1;
plen += 1;