diff options
author | David Young <dyoung@hdfgroup.org> | 2020-01-10 17:54:48 (GMT) |
---|---|---|
committer | David Young <dyoung@hdfgroup.org> | 2020-01-10 18:00:22 (GMT) |
commit | 671f7552ab56a446bb3b1227d0618e4add965316 (patch) | |
tree | ba52629d88a5df5e0536488c83df8f2b05360623 /src | |
parent | f19b6c4d485bd34cba2c5825718c4330664ad54f (diff) | |
download | hdf5-671f7552ab56a446bb3b1227d0618e4add965316.zip hdf5-671f7552ab56a446bb3b1227d0618e4add965316.tar.gz hdf5-671f7552ab56a446bb3b1227d0618e4add965316.tar.bz2 |
Correct some irregular indentation, delete an unused line, split an
`if ((p = allocate(...)) == NULL) { }` into two statements, `p =
allocate(...); if (p == NULL) { }`, put a semicolon at the end of an
HGOTO_ERROR(), remove comments /* end if */, /* end for */ after closing
curly braces.
Diffstat (limited to 'src')
-rw-r--r-- | src/H5FDvfd_swmr.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/src/H5FDvfd_swmr.c b/src/H5FDvfd_swmr.c index ed7808c..bf47c63 100644 --- a/src/H5FDvfd_swmr.c +++ b/src/H5FDvfd_swmr.c @@ -1476,24 +1476,22 @@ H5FD__vfd_swmr_index_deserialize(H5FD_t *_file, /* Read index entries */ if(md_index->num_entries) { - /* Allocate memory for index entries */ - if(NULL == (md_index->entries = - H5FL_SEQ_MALLOC(H5FD_vfd_swmr_idx_entry_t, - md_index->num_entries))) - - HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, \ - "memory allocation failed for index entries") + md_index->entries = H5FL_SEQ_MALLOC(H5FD_vfd_swmr_idx_entry_t, + md_index->num_entries); + if (NULL == md_index->entries) { + HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, + "memory allocation failed for index entries"); + } - /* Decode index entries */ - for(i = 0; i < md_index->num_entries; i++) { + /* Decode index entries */ + for (i = 0; i < md_index->num_entries; i++) { UINT32DECODE(p, md_index->entries[i].hdf5_page_offset); UINT32DECODE(p, md_index->entries[i].md_file_page_offset); UINT32DECODE(p, md_index->entries[i].length); UINT32DECODE(p, md_index->entries[i].chksum); - } /* end for */ - - } /* end if */ + } + } /* Checksum is already valid */ UINT32DECODE(p, stored_chksum); |