Mercurial > mplayer.hg
diff m_config.c @ 18879:cc65a585fdcc
rm unnecesary casts from void* - part 3
author | reynaldo |
---|---|
date | Sun, 02 Jul 2006 08:17:07 +0000 |
parents | 5766a9d21992 |
children | 7d5035aafcc6 |
line wrap: on
line diff
--- a/m_config.c Sun Jul 02 03:59:36 2006 +0000 +++ b/m_config.c Sun Jul 02 08:17:07 2006 +0000 @@ -47,7 +47,7 @@ }; int i; - config = (m_config_t*)calloc(1,sizeof(m_config_t)); + config = calloc(1,sizeof(m_config_t)); config->lvl = 1; // 0 Is the defaults if(!inited) { inited = 1; @@ -133,7 +133,7 @@ m_option_save(co->opt,co->slots->data,co->opt->p); // Allocate a new slot - slot = (m_config_save_slot_t*)calloc(1,sizeof(m_config_save_slot_t) + co->opt->type->size); + slot = calloc(1,sizeof(m_config_save_slot_t) + co->opt->type->size); slot->lvl = config->lvl; slot->prev = co->slots; co->slots = slot; @@ -193,7 +193,7 @@ #endif // Allocate a new entry for this option - co = (m_config_option_t*)calloc(1,sizeof(m_config_option_t) + arg->type->size); + co = calloc(1,sizeof(m_config_option_t) + arg->type->size); co->opt = arg; // Fill in the full name @@ -225,7 +225,7 @@ } if(!(co->flags & M_CFG_OPT_ALIAS)) { // Allocate a slot for the defaults - sl = (m_config_save_slot_t*)calloc(1,sizeof(m_config_save_slot_t) + arg->type->size); + sl = calloc(1,sizeof(m_config_save_slot_t) + arg->type->size); m_option_save(arg,sl->data,(void**)arg->p); // Hack to avoid too much trouble with dynamicly allocated data : // We always use a dynamic version @@ -235,7 +235,7 @@ } sl->lvl = 0; sl->prev = NULL; - co->slots = (m_config_save_slot_t*)calloc(1,sizeof(m_config_save_slot_t) + arg->type->size); + co->slots = calloc(1,sizeof(m_config_save_slot_t) + arg->type->size); co->slots->prev = sl; co->slots->lvl = config->lvl; m_option_copy(co->opt,co->slots->data,sl->data);