Description:

Cleanups from Dana's review.

Tested on:
    MacOSX/64 10.11.5 (amazon) w/C++ & FORTRAN
    (h5committest forthcoming)
This commit is contained in:
Quincey Koziol 2016-09-29 11:01:23 -07:00
parent fa66428a6d
commit 1853868fdc
3 changed files with 6 additions and 6 deletions

View File

@ -410,8 +410,8 @@ herr_t create_long_dataset(hid_t fid, const char *dsname, const char *dsidx, int
long s44_wbuf[DIM4_SIZE] = {280,280};
/* Allocate buffer */
buf = (long *)HDmalloc(sizeof(long) * DIM1_SIZE * DIM2_SIZE * DIM3_SIZE * DIM4_SIZE);
HDassert(buf);
if(NULL == (buf = (long *)HDmalloc(sizeof(long) * DIM1_SIZE * DIM2_SIZE * DIM3_SIZE * DIM4_SIZE)))
return FAIL;
/* make a dataset */
if(H5LTmake_dataset_long(fid, dsname, rank, dims, buf) >= 0) {

View File

@ -57,8 +57,8 @@ int main(void)
hsize_t height = HEIGHT;
/* Allocate buffer */
buf = (unsigned char *)malloc(WIDTH * HEIGHT);
assert(buf);
if(NULL == (buf = (unsigned char *)malloc(WIDTH * HEIGHT)))
return EXIT_FAILURE;
/* create a file */
if ((fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT))<0)

View File

@ -867,8 +867,8 @@ h5_fileaccess(void)
HDassert(HDstrlen(multi_letters)==H5FD_MEM_NTYPES);
for(mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; H5_INC_ENUM(H5FD_mem_t, mt)) {
memb_fapl[mt] = H5P_DEFAULT;
sv[mt] = (char *)HDmalloc(1024);
HDassert(sv[mt]);
if(NULL == (sv[mt] = (char *)HDmalloc(1024)))
return -1;
HDsprintf(sv[mt], "%%s-%c.h5", multi_letters[mt]);
memb_name[mt] = sv[mt];
memb_addr[mt] = (haddr_t)MAX(mt - 1, 0) * (HADDR_MAX / 10);