diff options
-rw-r--r-- | src/H5D.c | 74 | ||||
-rw-r--r-- | src/H5S.c | 18 | ||||
-rw-r--r-- | src/H5Shyper.c | 3 | ||||
-rw-r--r-- | src/H5Sselect.c | 12 |
4 files changed, 60 insertions, 47 deletions
@@ -1442,19 +1442,19 @@ printf("%s: check 5.0, nelmts=%d, smine_start=%d, smine_nelmts=%d\n",FUNC,(int)n } #ifdef QAK printf("%s: check 6.0\n",FUNC); -{ - int i; - int *b; - - if(qak_debug) { - b=tconv_buf; - printf("\ntconv_buf:"); - for (i=0; i<smine_nelmts; i++,b++) { - printf("(%d)%d ",i,*b); + { + int i; + int *b; + + if(qak_debug) { + b=tconv_buf; + printf("\ntconv_buf:"); + for (i=0; i<smine_nelmts; i++,b++) { + printf("(%d)%d ",i,*b); + } + printf("\n"); } - printf("\n"); } -} #endif /* QAK */ if ((H5D_OPTIMIZE_PIPE && H5T_BKG_YES==need_bkg) || (!H5D_OPTIMIZE_PIPE && need_bkg)) { @@ -1503,6 +1503,11 @@ printf("%s: check 9.0\n",FUNC); ret_value = SUCCEED; done: + /* Release selection iterators */ + H5S_sel_iter_release(file_space,&file_iter); + H5S_sel_iter_release(mem_space,&mem_iter); + H5S_sel_iter_release(mem_space,&bkg_iter); + if (src_id >= 0) H5I_dec_ref(src_id); if (dst_id >= 0) H5I_dec_ref(dst_id); if (tconv_buf && NULL==xfer_parms->tconv_buf) @@ -1511,10 +1516,6 @@ printf("%s: check 9.0\n",FUNC); H5MM_xfree (bkg_buf); if (free_this_space) H5S_close (free_this_space); - /* Release selection iterators */ - H5S_sel_iter_release(file_space,&file_iter); - H5S_sel_iter_release(mem_space,&mem_iter); - H5S_sel_iter_release(mem_space,&bkg_iter); FUNC_LEAVE(ret_value); } @@ -1761,25 +1762,25 @@ printf("%s: check 5.0, nelmts=%d, smine_start=%d, smine_nelmts=%d\n",FUNC,(int)n HGOTO_ERROR (H5E_IO, H5E_WRITEERROR, FAIL, "mem gather failed"); } #ifdef QAK -{ - int i; - int *b; - - if(qak_debug) { - b=buf; - b+=1430; - printf("buf:"); - for (i=0; i<smine_nelmts; i++,b++) { - printf("(%d)%d ",i,*b); - } - b=tconv_buf; - printf("\ntconv_buf:"); - for (i=0; i<smine_nelmts; i++,b++) { - printf("(%d)%d ",i,*b); + { + int i; + int *b; + + if(qak_debug) { + b=buf; + b+=1430; + printf("buf:"); + for (i=0; i<smine_nelmts; i++,b++) { + printf("(%d)%d ",i,*b); + } + b=tconv_buf; + printf("\ntconv_buf:"); + for (i=0; i<smine_nelmts; i++,b++) { + printf("(%d)%d ",i,*b); + } + printf("\n"); } - printf("\n"); } -} printf("%s: check 6.0\n",FUNC); #endif /* QAK */ if ((H5D_OPTIMIZE_PIPE && H5T_BKG_YES==need_bkg) || @@ -1829,6 +1830,11 @@ printf("%s: check 6.0\n",FUNC); ret_value = SUCCEED; done: + /* Release selection iterators */ + H5S_sel_iter_release(file_space,&file_iter); + H5S_sel_iter_release(mem_space,&mem_iter); + H5S_sel_iter_release(mem_space,&bkg_iter); + if (src_id >= 0) H5I_dec_ref(src_id); if (dst_id >= 0) H5I_dec_ref(dst_id); if (tconv_buf && NULL==xfer_parms->tconv_buf) @@ -1837,10 +1843,6 @@ printf("%s: check 6.0\n",FUNC); H5MM_xfree (bkg_buf); if (free_this_space) H5S_close (free_this_space); - /* Release selection iterators */ - H5S_sel_iter_release(file_space,&file_iter); - H5S_sel_iter_release(mem_space,&mem_iter); - H5S_sel_iter_release(mem_space,&bkg_iter); FUNC_LEAVE(ret_value); } @@ -99,7 +99,8 @@ H5S_term_interface(void) EXAMPLES REVISION LOG --------------------------------------------------------------------------*/ -H5S_t *H5S_create(H5S_class_t type) +H5S_t * +H5S_create(H5S_class_t type) { H5S_t *ret_value = NULL; @@ -136,7 +137,8 @@ done: EXAMPLES REVISION LOG --------------------------------------------------------------------------*/ -hid_t H5Screate(H5S_class_t type) +hid_t +H5Screate(H5S_class_t type) { H5S_t *new_ds=NULL; hid_t ret_value = FAIL; @@ -179,7 +181,8 @@ done: * *------------------------------------------------------------------------- */ -herr_t H5S_close(H5S_t *ds) +herr_t +H5S_close(H5S_t *ds) { FUNC_ENTER(H5S_close, FAIL); @@ -270,7 +273,8 @@ H5Sclose (hid_t space_id) * *------------------------------------------------------------------------- */ -herr_t H5S_release_simple(H5S_simple_t *simple) +herr_t +H5S_release_simple(H5S_simple_t *simple) { FUNC_ENTER(H5S_release_simple, FAIL); @@ -343,7 +347,8 @@ H5Scopy (hid_t space_id) * *------------------------------------------------------------------------- */ -herr_t H5S_extent_copy(H5S_extent_t *dst, const H5S_extent_t *src) +herr_t +H5S_extent_copy(H5S_extent_t *dst, const H5S_extent_t *src) { int i; @@ -403,7 +408,8 @@ herr_t H5S_extent_copy(H5S_extent_t *dst, const H5S_extent_t *src) * *------------------------------------------------------------------------- */ -H5S_t * H5S_copy(const H5S_t *src) +H5S_t * +H5S_copy(const H5S_t *src) { H5S_t *dst = NULL; diff --git a/src/H5Shyper.c b/src/H5Shyper.c index 0ea8eb9..e777e6f 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -1114,7 +1114,8 @@ printf("%s: check 2.0\n",FUNC); EXAMPLES REVISION LOG --------------------------------------------------------------------------*/ -static intn H5S_hyper_bsearch(hssize_t size, H5S_hyper_bound_t *barr, size_t count) +static intn +H5S_hyper_bsearch(hssize_t size, H5S_hyper_bound_t *barr, size_t count) { intn lo, mid, hi; /* Indices for the search */ intn ret_value=-1; /* Return value index */ diff --git a/src/H5Sselect.c b/src/H5Sselect.c index e04654c..4763149 100644 --- a/src/H5Sselect.c +++ b/src/H5Sselect.c @@ -38,7 +38,8 @@ static void H5S_select_term(void); EXAMPLES REVISION LOG --------------------------------------------------------------------------*/ -herr_t H5S_select_init (void) +herr_t +H5S_select_init (void) { herr_t ret_value = SUCCEED; FUNC_ENTER (H5S_select_init, FAIL); @@ -89,7 +90,8 @@ H5S_select_term(void) EXAMPLES REVISION LOG --------------------------------------------------------------------------*/ -herr_t H5S_select_copy (H5S_t *dst, const H5S_t *src) +herr_t +H5S_select_copy (H5S_t *dst, const H5S_t *src) { FUNC_ENTER (H5S_select_copy, FAIL); @@ -323,7 +325,8 @@ done: EXAMPLES REVISION LOG --------------------------------------------------------------------------*/ -hsize_t H5Sselect_npoints (hid_t spaceid) +hsize_t +H5Sselect_npoints (hid_t spaceid) { H5S_t *space = NULL; /* Dataspace to modify selection of */ hsize_t ret_value=0; /* return value */ @@ -358,7 +361,8 @@ hsize_t H5Sselect_npoints (hid_t spaceid) EXAMPLES REVISION LOG --------------------------------------------------------------------------*/ -hsize_t H5S_select_npoints (const H5S_t *space) +hsize_t +H5S_select_npoints (const H5S_t *space) { herr_t ret_value=FAIL; /* return value */ |