diff options
Diffstat (limited to 'tools/h5dump')
-rw-r--r-- | tools/h5dump/h5dump.c | 8 | ||||
-rw-r--r-- | tools/h5dump/h5dump_ddl.c | 8 | ||||
-rw-r--r-- | tools/h5dump/h5dump_xml.c | 12 |
3 files changed, 14 insertions, 14 deletions
diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c index 09dead0..ac9d1d3 100644 --- a/tools/h5dump/h5dump.c +++ b/tools/h5dump/h5dump.c @@ -642,7 +642,7 @@ parse_hsize_list(const char *h_list, subset_d *d) return; /* allocate an array for the integers in the list */ - p_list = (hsize_t *)calloc(size_count, sizeof(hsize_t)); + p_list = (hsize_t *)HDcalloc(size_count, sizeof(hsize_t)); for (ptr = h_list; i < size_count && ptr && *ptr && *ptr != ';' && *ptr != ']'; ptr++) if(isdigit(*ptr)) { @@ -684,7 +684,7 @@ parse_subset_params(char *dset) if (!disable_compact_subset && ((brace = strrchr(dset, '[')) != NULL)) { *brace++ = '\0'; - s = (struct subset_t *)calloc(1, sizeof(struct subset_t)); + s = (struct subset_t *)HDcalloc(1, sizeof(struct subset_t)); parse_hsize_list(brace, &s->start); while (*brace && *brace != ';') @@ -906,7 +906,7 @@ parse_command_line(int argc, const char *argv[]) } /* this will be plenty big enough to hold the info */ - if((hand = (struct handler_t *)calloc((size_t)argc, sizeof(struct handler_t)))==NULL) { + if((hand = (struct handler_t *)HDcalloc((size_t)argc, sizeof(struct handler_t)))==NULL) { goto error; } @@ -1163,7 +1163,7 @@ parse_start: s = last_dset->subset_info; } else { - last_dset->subset_info = s = (struct subset_t *)calloc(1, sizeof(struct subset_t)); + last_dset->subset_info = s = (struct subset_t *)HDcalloc(1, sizeof(struct subset_t)); } /* diff --git a/tools/h5dump/h5dump_ddl.c b/tools/h5dump/h5dump_ddl.c index f53a9d2..8117238 100644 --- a/tools/h5dump/h5dump_ddl.c +++ b/tools/h5dump/h5dump_ddl.c @@ -1502,26 +1502,26 @@ handle_datasets(hid_t fid, const char *dset, void *data, int pe, const char *dis * dimensions */ if(!sset->start.data) { /* default to (0, 0, ...) for the start coord */ - sset->start.data = (hsize_t *)calloc((size_t)ndims, sizeof(hsize_t)); + sset->start.data = (hsize_t *)HDcalloc((size_t)ndims, sizeof(hsize_t)); sset->start.len = ndims; } if(!sset->stride.data) { - sset->stride.data = (hsize_t *)calloc((size_t)ndims, sizeof(hsize_t)); + sset->stride.data = (hsize_t *)HDcalloc((size_t)ndims, sizeof(hsize_t)); sset->stride.len = ndims; for (i = 0; i < ndims; i++) sset->stride.data[i] = 1; } if(!sset->count.data) { - sset->count.data = (hsize_t *)calloc((size_t)ndims, sizeof(hsize_t)); + sset->count.data = (hsize_t *)HDcalloc((size_t)ndims, sizeof(hsize_t)); sset->count.len = ndims; for (i = 0; i < ndims; i++) sset->count.data[i] = 1; } if(!sset->block.data) { - sset->block.data = (hsize_t *)calloc((size_t)ndims, sizeof(hsize_t)); + sset->block.data = (hsize_t *)HDcalloc((size_t)ndims, sizeof(hsize_t)); sset->block.len = ndims; for (i = 0; i < ndims; i++) sset->block.data[i] = 1; diff --git a/tools/h5dump/h5dump_xml.c b/tools/h5dump/h5dump_xml.c index 934682c..b92ccdb 100644 --- a/tools/h5dump/h5dump_xml.c +++ b/tools/h5dump/h5dump_xml.c @@ -693,7 +693,7 @@ xml_escape_the_string(const char *str, int slen) } cp = str; - rcp = ncp = (char *) calloc((len + extra + 1), sizeof(char)); + rcp = ncp = (char *) HDcalloc((len + extra + 1), sizeof(char)); if (ncp == NULL) return NULL; /* ?? */ @@ -2899,7 +2899,7 @@ xml_print_refs(hid_t did, int source) if ((tsiz = H5Tget_size(type)) == 0) goto error; - buf = (char *) calloc((size_t)(ssiz * tsiz), sizeof(char)); + buf = (char *) HDcalloc((size_t)(ssiz * tsiz), sizeof(char)); if (buf == NULL) goto error; e = H5Dread(did, H5T_STD_REF_OBJ, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf); @@ -2915,7 +2915,7 @@ xml_print_refs(hid_t did, int source) if ((tsiz = H5Tget_size(type)) == 0) goto error; - buf = (char *) calloc((size_t)(ssiz * tsiz), sizeof(char)); + buf = (char *) HDcalloc((size_t)(ssiz * tsiz), sizeof(char)); if (buf == NULL) { goto error; } @@ -3085,7 +3085,7 @@ xml_print_strs(hid_t did, int source) bp = (char*) buf; if (!is_vlstr) - onestring = (char *) calloc(tsiz, sizeof(char)); + onestring = (char *) HDcalloc(tsiz, sizeof(char)); /* setup */ HDmemset(&buffer, 0, sizeof(h5tools_str_t)); @@ -4355,8 +4355,8 @@ xml_print_enum(hid_t type) } /* Get the names and raw values of all members */ - name = (char **)calloc(nmembs, sizeof(char *)); - value = (unsigned char *)calloc(nmembs, MAX(H5Tget_size(type), dst_size)); + name = (char **)HDcalloc(nmembs, sizeof(char *)); + value = (unsigned char *)HDcalloc(nmembs, MAX(H5Tget_size(type), dst_size)); for (i = 0; i < nmembs; i++) { name[i] = H5Tget_member_name(type, i); |