diff --git a/src/h5core/h5_hdf5.c b/src/h5core/h5_hdf5.c index 7e3bcbc..938d5ce 100644 --- a/src/h5core/h5_hdf5.c +++ b/src/h5core/h5_hdf5.c @@ -877,8 +877,8 @@ hdf5_set_fapl_mpio_property ( MPI_Info info ) { HDF5_WRAPPER_ENTER3 (h5_err_t, - "fapl_id=%d, comm=%d, info=%d", - fapl_id, (int)comm, (int)info); + "fapl_id=%d, comm=0x%p, info=0x%p", + fapl_id, (void*)comm, (void*)info); if (H5Pset_fapl_mpio (fapl_id, comm, info) < 0) HDF5_WRAPPER_LEAVE ( h5_error ( @@ -895,8 +895,8 @@ hdf5_set_fapl_mpiposix_property ( hbool_t use_gpfs ) { HDF5_WRAPPER_ENTER3 (h5_err_t, - "fapl_id=%d, comm=%d, use_gpfs=%d", - fapl_id, (int)comm, (int)use_gpfs); + "fapl_id=%d, comm=0x%p, use_gpfs=%d", + fapl_id, (void*)comm, (int)use_gpfs); if ( H5Pset_fapl_mpiposix (fapl_id, comm, use_gpfs) < 0) HDF5_WRAPPER_LEAVE ( h5_error ( diff --git a/src/h5core/h5_syscall.c b/src/h5core/h5_syscall.c index 34ffe1c..d6d3fb3 100644 --- a/src/h5core/h5_syscall.c +++ b/src/h5core/h5_syscall.c @@ -1,6 +1,6 @@ #include #include -#include +#include #include "h5core/h5_core.h" #include "h5_core_private.h" @@ -40,12 +40,14 @@ h5priv_strdup ( const char* s1 ) { MALLOC_WRAPPER_ENTER1 (char_p, "s=%s", s1); - char_p s2 = strdup (s1); + + char_p s2 = h5_calloc (1, strlen (s1)+1 ); if (s2 == NULL) { MALLOC_WRAPPER_LEAVE ( (char_p)h5_error (H5_ERR_NOMEM, "Out of memory.")); } - MALLOC_WRAPPER_RETURN (s2); + MALLOC_WRAPPER_RETURN (strcpy (s2, s1)); + } h5_err_t diff --git a/src/h5core/h5t_adjacencies_tetm.c b/src/h5core/h5t_adjacencies_tetm.c index 11c4098..d49898e 100644 --- a/src/h5core/h5t_adjacencies_tetm.c +++ b/src/h5core/h5t_adjacencies_tetm.c @@ -35,7 +35,7 @@ alloc_tv ( TRY( adj->tv.v = h5_alloc (adj->tv.v, num_vertices*sizeof(*adj->tv.v)) ); size_t i = from_lvl <= 0 ? 0 : t->num_vertices[from_lvl-1]; - bzero (adj->tv.v+i, (num_vertices-i)*sizeof(*adj->tv.v)); + memset (adj->tv.v+i, 0, (num_vertices-i)*sizeof(*adj->tv.v)); H5_PRIV_FUNC_RETURN (H5_SUCCESS); } @@ -955,7 +955,7 @@ release_internal_structs ( TRY( release_tv (f) ); TRY( h5priv_hdestroy (&t->adjacencies.te_hash) ); TRY( h5priv_hdestroy (&t->adjacencies.td_hash) ); - bzero (&t->adjacencies, sizeof (t->adjacencies)); + memset (&t->adjacencies, 0, sizeof (t->adjacencies)); H5_PRIV_FUNC_RETURN (H5_SUCCESS); } diff --git a/src/h5core/h5t_adjacencies_trim.c b/src/h5core/h5t_adjacencies_trim.c index 7b1a542..9fc8dba 100644 --- a/src/h5core/h5t_adjacencies_trim.c +++ b/src/h5core/h5t_adjacencies_trim.c @@ -31,7 +31,7 @@ alloc_tv ( TRY( adj->tv.v = h5_alloc (adj->tv.v, num_vertices*sizeof(*adj->tv.v)) ); size_t i = from_lvl <= 0 ? 0 : t->num_vertices[from_lvl-1]; - bzero (adj->tv.v+i, (num_vertices-i)*sizeof(*adj->tv.v)); + memset (adj->tv.v+i, 0, (num_vertices-i)*sizeof(*adj->tv.v)); H5_PRIV_FUNC_RETURN (H5_SUCCESS); } @@ -555,7 +555,7 @@ release_internal_structs ( h5t_fdata_t *t = f->t; TRY( release_tv (f) ); TRY( h5priv_hdestroy (&t->adjacencies.te_hash) ); - bzero (&t->adjacencies, sizeof (t->adjacencies)); + memset (&t->adjacencies, 0, sizeof (t->adjacencies)); H5_PRIV_FUNC_RETURN (H5_SUCCESS); } diff --git a/src/h5core/h5t_retrieve.c b/src/h5core/h5t_retrieve.c index 9aad8a1..7b24210 100644 --- a/src/h5core/h5t_retrieve.c +++ b/src/h5core/h5t_retrieve.c @@ -284,7 +284,7 @@ h5t_end_iterate_entities ( ) { UNUSED_ARGUMENT (f); H5_CORE_API_ENTER (h5_err_t); - bzero (iter, sizeof(*iter)); + memset (iter, 0, sizeof(*iter)); h5t_leaf_iterator_t* it = (h5t_leaf_iterator_t*)iter; it->face_idx = -1; it->elem_idx = -1; diff --git a/src/h5core/h5t_store_trim.c b/src/h5core/h5t_store_trim.c index d5ca62e..dabe972 100644 --- a/src/h5core/h5t_store_trim.c +++ b/src/h5core/h5t_store_trim.c @@ -1,4 +1,4 @@ -#include +#include #include "h5core/h5_core.h" #include "h5_core_private.h" diff --git a/src/include/h5core/h5t_retrieve.h b/src/include/h5core/h5t_retrieve.h index 32750c1..29b9f71 100644 --- a/src/include/h5core/h5t_retrieve.h +++ b/src/include/h5core/h5t_retrieve.h @@ -62,9 +62,9 @@ h5t_init_boundary_face_iterator ( ); h5_err_t -h5t_create_mtag_iterator ( +h5t_init_mtag_iterator ( h5_file_t* f, - h5t_iterator_t** iter, + h5t_iterator_t* iter, const char* name );