diff options
Diffstat (limited to 'm_struct.c')
-rw-r--r-- | m_struct.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/m_struct.c b/m_struct.c index 9ffd356d31..267d956df7 100644 --- a/m_struct.c +++ b/m_struct.c @@ -41,7 +41,7 @@ m_struct_alloc(const m_struct_t* st) { r = calloc(1,st->size); memcpy(r,st->defaults,st->size); - + for(i = 0 ; st->fields[i].name ; i++) { if(st->fields[i].type->flags & M_OPT_TYPE_DYNAMIC) memset(M_ST_MB_P(r,st->fields[i].p),0,st->fields[i].type->size); @@ -58,14 +58,14 @@ m_struct_set(const m_struct_t* st, void* obj, char* field, char* param) { mp_msg(MSGT_CFGPARSER, MSGL_ERR,"Struct %s doesn't have any %s field\n", st->name,field); return 0; - } + } if(f->type->parse(f,field,param,M_ST_MB_P(obj,f->p),M_CONFIG_FILE) < 0) { mp_msg(MSGT_CFGPARSER, MSGL_ERR,"Struct %s, field %s parsing error: %s\n", st->name,field,param); return 0; } - + return 1; } @@ -82,7 +82,7 @@ m_struct_reset(const m_struct_t* st, void* obj, const char* field) { // Only one f = m_struct_get_field(st,field); - if(!f) { + if(!f) { mp_msg(MSGT_CFGPARSER, MSGL_ERR,"Struct %s doesn't have any %s field\n", st->name,field); return; @@ -104,7 +104,7 @@ void* m_struct_copy(const m_struct_t* st, void* obj) { void* r = malloc(st->size); int i; - + memcpy(r,obj,st->size); for(i = 0 ; st->fields[i].name ; i++) { if(st->fields[i].type->flags & M_OPT_TYPE_DYNAMIC) |