From 4a33578c8ffadb8d22e6358b50f3590ac0993efb Mon Sep 17 00:00:00 2001 From: Achim Gsell Date: Fri, 9 Sep 2011 10:36:52 +0000 Subject: [PATCH] changes merged from r3753 --- src/h5core/h5_attach.c | 4 ++-- src/h5core/h5_openclose.c | 4 ++-- src/h5core/h5b_model.c | 8 ++++---- src/h5core/h5t_model_tetm.c | 2 +- src/h5core/h5t_model_trim.c | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/h5core/h5_attach.c b/src/h5core/h5_attach.c index d81cc7b..83dd29c 100644 --- a/src/h5core/h5_attach.c +++ b/src/h5core/h5_attach.c @@ -34,7 +34,7 @@ h5_add_attachment ( hsize_t write_length; char* buf = NULL; if (f->myproc == 0) { - TRY (buf = h5_alloc (NULL, fsize)); + TRY (buf = h5_calloc (1, fsize)); write_length = fsize; int fd; if ((fd = open (fname, O_RDONLY)) < 0) { @@ -65,7 +65,7 @@ h5_add_attachment ( } } else { - TRY (buf = h5_alloc (NULL, 1)); + TRY (buf = h5_calloc (1, 1)); write_length = 0; } diff --git a/src/h5core/h5_openclose.c b/src/h5core/h5_openclose.c index 136fd10..9ce09d2 100644 --- a/src/h5core/h5_openclose.c +++ b/src/h5core/h5_openclose.c @@ -63,7 +63,7 @@ h5upriv_open_file ( h5_file_t* const f /*!< IN: file handle */ ) { H5_PRIV_API_ENTER (h5_err_t, "f=%p", f); - TRY (f->u = (h5u_fdata_t*)h5_alloc (NULL, sizeof (*f->u))); + TRY (f->u = (h5u_fdata_t*)h5_calloc (1, sizeof (*f->u))); h5u_fdata_t *u = f->u; u->shape = -1; @@ -99,7 +99,7 @@ h5bpriv_open_file ( if (f->b) H5_PRIV_API_LEAVE (H5_SUCCESS); - TRY (f->b = (h5b_fdata_t*)h5_alloc (NULL, sizeof (*f->b))); + TRY (f->b = (h5b_fdata_t*)h5_calloc (1, sizeof (*f->b))); b = f->b; memset (b, 0, sizeof (*b)); diff --git a/src/h5core/h5b_model.c b/src/h5core/h5b_model.c index 0160320..aa7d2b7 100644 --- a/src/h5core/h5b_model.c +++ b/src/h5core/h5b_model.c @@ -338,7 +338,7 @@ _dissolve_ghostzones ( memcpy( write_layout, user_layout, f->nprocs*sizeof(h5b_partition_t) ); - TRY( p_begin = (struct list*)h5_alloc (NULL, sizeof(*p_begin)) ); + TRY( p_begin = (struct list*)h5_calloc (1, sizeof(*p_begin)) ); p_max = p_end = p_begin; memset( p_begin, 0, sizeof ( *p_begin ) ); @@ -351,7 +351,7 @@ _dissolve_ghostzones ( proc_q++, q++ ) { if ( have_ghostzone ( p, q ) ) { - TRY( p_el = (struct list*)h5_alloc (NULL, sizeof(*p_el)) ); + TRY( p_el = (struct list*)h5_calloc (1, sizeof(*p_el)) ); p_el->p = p; p_el->q = q; @@ -553,8 +553,8 @@ h5b_3d_set_view ( h5b_partition_t *write_layout; size_t size = f->nprocs * sizeof (h5b_partition_t); - TRY( user_layout = h5_alloc (NULL, size) ); - TRY( write_layout = h5_alloc (NULL, size) ); + TRY( user_layout = h5_calloc (1, size) ); + TRY( write_layout = h5_calloc (1, size) ); TRY( h5priv_mpi_allgather( p, 1, f->b->partition_mpi_t, diff --git a/src/h5core/h5t_model_tetm.c b/src/h5core/h5t_model_tetm.c index 2826d97..a9de017 100644 --- a/src/h5core/h5t_model_tetm.c +++ b/src/h5core/h5t_model_tetm.c @@ -101,7 +101,7 @@ h5t_add_tetrahedral_mesh ( TETRAHEDRAL_MESHES_GRPNAME, name)); - TRY (*mesh = h5_alloc (NULL, sizeof(**mesh))); + TRY (*mesh = h5_calloc (1, sizeof(**mesh))); h5t_mesh_t* m = *mesh; TRY (h5tpriv_init_mesh ( m, diff --git a/src/h5core/h5t_model_trim.c b/src/h5core/h5t_model_trim.c index d3caab6..508c555 100644 --- a/src/h5core/h5t_model_trim.c +++ b/src/h5core/h5t_model_trim.c @@ -50,7 +50,7 @@ h5t_open_triangle_mesh ( TRIANGLE_MESHES_GRPNAME, name)); - TRY (*mesh = h5_alloc (NULL, sizeof(**mesh))); + TRY (*mesh = h5_calloc (1, sizeof(**mesh))); h5t_mesh_t* m = *mesh; TRY (h5tpriv_init_mesh ( m,