[Xineliboutput-cvslog] vdr-xineliboutput/xine post.c, 1.22, 1.23 post_util.h, 1.3, 1.4
Brought to you by:
phintuka
From: Petri H. <phi...@us...> - 2008-05-22 09:50:23
|
Update of /cvsroot/xineliboutput/vdr-xineliboutput/xine In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv21785 Modified Files: post.c post_util.h Log Message: xine_xmalloc -> calloc Index: post.c =================================================================== RCS file: /cvsroot/xineliboutput/vdr-xineliboutput/xine/post.c,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- post.c 19 Feb 2008 03:00:36 -0000 1.22 +++ post.c 22 May 2008 09:50:12 -0000 1.23 @@ -83,7 +83,7 @@ post_api->get_parameters(pobj->post, pobj->param_data); if(!pnum) - pobj->properties_names = (char **) xine_xmalloc(sizeof(char *) * 2); + pobj->properties_names = (char **) calloc(2, sizeof(char *)); else pobj->properties_names = (char **) realloc(pobj->properties_names, sizeof(char *) * (pnum + 2)); @@ -112,11 +112,10 @@ static void __pplugin_update_parameters(xine_post_t *post, char *args) { - post_object_t pobj; char *p; - - memset(&pobj, 0, sizeof(post_object_t)); - pobj.post = post; + post_object_t pobj = { + .post = post, + }; if(__pplugin_retrieve_parameters(&pobj)) { int i; @@ -276,13 +275,12 @@ if(post) { if(!(*post_elements_num)) - post_elements = (post_element_t **) xine_xmalloc(sizeof(post_element_t *) * 2); + post_elements = (post_element_t **) calloc(2, sizeof(post_element_t *)); else post_elements = (post_element_t **) realloc(post_elements, sizeof(post_element_t *) * ((*post_elements_num) + 2)); - post_elements[(*post_elements_num)] = (post_element_t *) - xine_xmalloc(sizeof(post_element_t)); + post_elements[(*post_elements_num)] = calloc(1, sizeof(post_element_t)); post_elements[(*post_elements_num)]->post = post; post_elements[(*post_elements_num)]->name = strdup(plugin); #if 1 @@ -500,8 +498,7 @@ if( *post_elements_num == 0 ) return NULL; - post_elements = (post_element_t **) - xine_xmalloc(sizeof(post_element_t *) * (*post_elements_num)); + post_elements = calloc( (*post_elements_num), sizeof(post_element_t *)); if(fe->post_pip_enable) for( i = 0; i < fe->post_pip_elements_num; i++ ) { @@ -572,8 +569,7 @@ if( *post_elements_num == 0 ) return NULL; - post_elements = (post_element_t **) - xine_xmalloc(sizeof(post_element_t *) * (*post_elements_num)); + post_elements = calloc( (*post_elements_num), sizeof(post_element_t *)); if(fe->post_audio_enable) for( j = 0; j < fe->post_audio_elements_num; j++ ) { Index: post_util.h =================================================================== RCS file: /cvsroot/xineliboutput/vdr-xineliboutput/xine/post_util.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- post_util.h 28 Feb 2008 06:10:54 -0000 1.3 +++ post_util.h 22 May 2008 09:50:12 -0000 1.4 @@ -53,7 +53,7 @@ static void *init_plugin(xine_t *xine, void *data) { - post_class_t *class = (post_class_t *)malloc(sizeof(post_class_t)); + post_class_t *class = calloc(1, sizeof(post_class_t)); if (!class) return NULL; |