diff options
Diffstat (limited to 'fortran/src/H5Sf.c')
-rw-r--r-- | fortran/src/H5Sf.c | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/fortran/src/H5Sf.c b/fortran/src/H5Sf.c index d44bddd..0a50d25 100644 --- a/fortran/src/H5Sf.c +++ b/fortran/src/H5Sf.c @@ -758,10 +758,10 @@ nh5sselect_hyperslab_c ( hid_t_f *space_id , int_f *op, hssize_t_f *start, hsize { int ret_value = -1; hid_t c_space_id; - hssize_t *c_start; - hsize_t *c_count; - hsize_t *c_stride; - hsize_t *c_block; + hssize_t *c_start = NULL; + hsize_t *c_count = NULL; + hsize_t *c_stride = NULL; + hsize_t *c_block = NULL; H5S_seloper_t c_op; herr_t status; @@ -771,16 +771,16 @@ nh5sselect_hyperslab_c ( hid_t_f *space_id , int_f *op, hssize_t_f *start, hsize rank = H5Sget_simple_extent_ndims(*space_id); if (rank < 0 ) return ret_value; c_start = (hssize_t *)HDmalloc(sizeof(hssize_t)*rank); - if (!c_start) goto DONE; + if (c_start == NULL) goto DONE; c_count = (hsize_t *)HDmalloc(sizeof(hsize_t)*rank); - if (!c_count) goto DONE; + if (c_count == NULL) goto DONE; c_stride = (hsize_t *)HDmalloc(sizeof(hsize_t)*rank); - if (!c_stride) goto DONE; + if (c_stride == NULL) goto DONE; c_block = (hsize_t *)HDmalloc(sizeof(hsize_t)*rank); - if (!c_block) goto DONE; + if (c_block == NULL) goto DONE; /* @@ -805,10 +805,10 @@ nh5sselect_hyperslab_c ( hid_t_f *space_id , int_f *op, hssize_t_f *start, hsize status = H5Sselect_hyperslab(c_space_id, c_op, c_start, c_stride, c_count, c_block); if ( status >= 0 ) ret_value = 0; DONE: - if(!c_start ) HDfree(c_start); - if(!c_count ) HDfree(c_count); - if(!c_stride) HDfree(c_stride); - if(!c_block ) HDfree(c_block); + if(c_start != NULL) HDfree(c_start); + if(c_count != NULL) HDfree(c_count); + if(c_stride!= NULL) HDfree(c_stride); + if(c_block != NULL) HDfree(c_block); return ret_value; } #ifdef NEW_HYPERSLAB_API @@ -834,10 +834,10 @@ nh5scombine_hyperslab_c ( hid_t_f *space_id , int_f *op, hssize_t_f *start, hsiz int ret_value = -1; hid_t c_space_id; hid_t c_hyper_id; - hssize_t *c_start; - hsize_t *c_count; - hsize_t *c_stride; - hsize_t *c_block; + hssize_t *c_start = NULL; + hsize_t *c_count = NULL; + hsize_t *c_stride = NULL; + hsize_t *c_block = NULL; H5S_seloper_t c_op; herr_t status; @@ -847,16 +847,16 @@ nh5scombine_hyperslab_c ( hid_t_f *space_id , int_f *op, hssize_t_f *start, hsiz rank = H5Sget_simple_extent_ndims(*space_id); if (rank < 0 ) return ret_value; c_start = (hssize_t *)HDmalloc(sizeof(hssize_t)*rank); - if (!c_start) goto DONE; + if (c_start == NULL) goto DONE; c_count = (hsize_t *)HDmalloc(sizeof(hsize_t)*rank); - if (!c_count) goto DONE; + if (c_count == NULL) goto DONE; c_stride = (hsize_t *)HDmalloc(sizeof(hsize_t)*rank); - if (!c_stride) goto DONE; + if (c_stride == NULL) goto DONE; c_block = (hsize_t *)HDmalloc(sizeof(hsize_t)*rank); - if (!c_block) goto DONE; + if (c_block == NULL) goto DONE; /* @@ -879,10 +879,10 @@ nh5scombine_hyperslab_c ( hid_t_f *space_id , int_f *op, hssize_t_f *start, hsiz *hyper_id = (hid_t_f)c_hyper_id; ret_value = 0; DONE: - if(!c_start ) HDfree(c_start); - if(!c_count ) HDfree(c_count); - if(!c_stride) HDfree(c_stride); - if(!c_block ) HDfree(c_block); + if(c_start != NULL) HDfree(c_start); + if(c_count != NULL) HDfree(c_count); + if(c_stride!= NULL) HDfree(c_stride); + if(c_block != NULL) HDfree(c_block); return ret_value; } /*---------------------------------------------------------------------------- |