Commit 4a33578c authored by gsell's avatar gsell

changes merged from r3753

parent 72920b2c
......@@ -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;
}
......
......@@ -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));
......
......@@ -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,
......
......@@ -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,
......
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment