summaryrefslogtreecommitdiffstats
path: root/hl/src
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2020-05-15 12:02:37 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2020-05-15 12:02:37 (GMT)
commit730d6cc53f3914f951e1177fc29835486b61dcdb (patch)
tree5e730157957cd611c1ff8fd4a13030c4340e1121 /hl/src
parent4328846bde89b58e42f0cc6ba165092f91717b25 (diff)
downloadhdf5-730d6cc53f3914f951e1177fc29835486b61dcdb.zip
hdf5-730d6cc53f3914f951e1177fc29835486b61dcdb.tar.gz
hdf5-730d6cc53f3914f951e1177fc29835486b61dcdb.tar.bz2
Normalization of high-level library with develop. Also brings the
warnhist script over.
Diffstat (limited to 'hl/src')
-rw-r--r--hl/src/H5DO.c6
-rw-r--r--hl/src/H5DS.c45
-rw-r--r--hl/src/H5IM.c38
-rw-r--r--hl/src/H5LD.c8
-rw-r--r--hl/src/H5LT.c305
-rw-r--r--hl/src/H5LTpublic.h2
-rw-r--r--hl/src/H5TB.c60
7 files changed, 237 insertions, 227 deletions
diff --git a/hl/src/H5DO.c b/hl/src/H5DO.c
index 057c43b..0fbdab3 100644
--- a/hl/src/H5DO.c
+++ b/hl/src/H5DO.c
@@ -90,7 +90,7 @@ H5DOread_chunk(hid_t dset_id, hid_t dxpl_id, const hsize_t *offset, uint32_t *fi
* This routine is copied from the fast forward feature branch: features/hdf5_ff
* src/H5FF.c:H5DOappend() with the following modifications:
* 1) Remove and replace macro calls such as
- * FUNC_ENTER_API, H5TRACE, HGOTO_ERROR
+ * FUNC_ENTER_API, H5TRACE, HGOTO_ERROR
* accordingly because hl does not have these macros
* 2) Replace H5I_get_type() by H5Iget_type()
* 3) Replace H5P_isa_class() by H5Pisa_class()
@@ -103,7 +103,7 @@ H5DOread_chunk(hid_t dset_id, hid_t dxpl_id, const hsize_t *offset, uint32_t *fi
*-------------------------------------------------------------------------
*/
herr_t
-H5DOappend(hid_t dset_id, hid_t dxpl_id, unsigned axis, size_t extension,
+H5DOappend(hid_t dset_id, hid_t dxpl_id, unsigned axis, size_t extension,
hid_t memtype, const void *buf)
{
hbool_t created_dxpl = FALSE; /* Whether we created a DXPL */
@@ -161,7 +161,7 @@ H5DOappend(hid_t dset_id, hid_t dxpl_id, unsigned axis, size_t extension,
if(H5Sget_simple_extent_dims(space_id, size, NULL) < 0)
goto done;
- /* Adjust the dimension size of the requested dimension,
+ /* Adjust the dimension size of the requested dimension,
* but first record the old dimension size
*/
old_size = size[axis];
diff --git a/hl/src/H5DS.c b/hl/src/H5DS.c
index 067992f..520d464 100644
--- a/hl/src/H5DS.c
+++ b/hl/src/H5DS.c
@@ -143,7 +143,7 @@ herr_t H5DSattach_scale(hid_t did,
H5O_info_t oi1, oi2;
H5I_type_t it1, it2;
int i;
- size_t len;
+ size_t len;
int found_ds=0;
htri_t is_scale;
@@ -156,7 +156,7 @@ herr_t H5DSattach_scale(hid_t did,
return FAIL;
/* the dataset cannot be a DS dataset */
- if ( is_scale == 1)
+ if (is_scale == 1)
return FAIL;
/* get info for the dataset in the parameter list */
@@ -177,7 +177,7 @@ herr_t H5DSattach_scale(hid_t did,
if ((it2 = H5Iget_type(dsid)) < 0)
return FAIL;
- if (H5I_DATASET!=it1 || H5I_DATASET!=it2)
+ if (H5I_DATASET != it1 || H5I_DATASET != it2)
return FAIL;
/* the DS dataset cannot have dimension scales */
@@ -202,19 +202,19 @@ herr_t H5DSattach_scale(hid_t did,
return FAIL;
/* get rank */
- if ((rank=H5Sget_simple_extent_ndims(sid)) < 0)
+ if ((rank = H5Sget_simple_extent_ndims(sid)) < 0)
goto out;
/* scalar rank */
- if (rank==0)
- rank=1;
+ if (rank == 0)
+ rank = 1;
/* close dataset space */
if (H5Sclose(sid) < 0)
return FAIL;
/* parameter range checking */
- if (idx>(unsigned)rank-1)
+ if (idx > (unsigned)rank-1)
return FAIL;
/*-------------------------------------------------------------------------
@@ -508,7 +508,7 @@ herr_t H5DSattach_scale(hid_t did,
*-------------------------------------------------------------------------
*/
- if((is_ds=H5DSis_scale(dsid)) < 0)
+ if((is_ds = H5DSis_scale(dsid)) < 0)
return FAIL;
if(is_ds == 0) {
@@ -598,7 +598,7 @@ herr_t H5DSdetach_scale(hid_t did,
/* check for valid types of identifiers */
- if(H5I_DATASET!=H5Iget_type(did) || H5I_DATASET!=H5Iget_type(dsid))
+ if(H5I_DATASET != H5Iget_type(did) || H5I_DATASET != H5Iget_type(dsid))
return FAIL;
if((is_scale = H5DSis_scale(did)) < 0)
@@ -626,7 +626,7 @@ herr_t H5DSdetach_scale(hid_t did,
*-------------------------------------------------------------------------
*/
/* try to find the attribute "DIMENSION_LIST" on the >>data<< dataset */
- if ((has_dimlist = H5LT_find_attribute(did,DIMENSION_LIST)) < 0)
+ if ((has_dimlist = H5LT_find_attribute(did, DIMENSION_LIST)) < 0)
return FAIL;
if (has_dimlist == 0)
@@ -637,7 +637,7 @@ herr_t H5DSdetach_scale(hid_t did,
return FAIL;
/* get rank */
- if ((rank=H5Sget_simple_extent_ndims(sid)) < 0)
+ if ((rank = H5Sget_simple_extent_ndims(sid)) < 0)
goto out;
/* close dataset space */
@@ -645,7 +645,7 @@ herr_t H5DSdetach_scale(hid_t did,
return FAIL;
/* parameter range checking */
- if (idx>(unsigned)rank-1)
+ if (idx > (unsigned)rank-1)
return FAIL;
/*-------------------------------------------------------------------------
@@ -704,8 +704,7 @@ herr_t H5DSdetach_scale(hid_t did,
goto out;
/* same object, reset */
- if(dsid_oi.fileno == tmp_oi.fileno && dsid_oi.addr == tmp_oi.addr)
- {
+ if(dsid_oi.fileno == tmp_oi.fileno && dsid_oi.addr == tmp_oi.addr) {
/* If there are more than one reference in the VL element
and the reference we found is not the last one,
copy the last one to replace the found one since the order
@@ -727,7 +726,7 @@ herr_t H5DSdetach_scale(hid_t did,
we do not need to continue the search if it is found */
found_ds = 1;
break;
- }
+ } /* end if */
} /* j */
} /* if */
@@ -795,7 +794,7 @@ herr_t H5DSdetach_scale(hid_t did,
if(H5Aread(aid, ntid, dsbuf) < 0)
goto out;
- for(ii=0; ii<nelmts; ii++) {
+ for(ii = 0; ii < nelmts; ii++) {
/* First check if we have the same dimension index */
if(idx == dsbuf[ii].dim_idx) {
/* get the reference to the dataset */
@@ -820,7 +819,7 @@ herr_t H5DSdetach_scale(hid_t did,
nelmts--;
found_dset=1;
break;
- } /* if */
+ } /* end if */
} /* if we have the same dimension index */
} /* ii */
@@ -990,7 +989,7 @@ htri_t H5DSis_attached(hid_t did,
if ((it2 = H5Iget_type(dsid)) < 0)
return FAIL;
- if (H5I_DATASET!=it1 || H5I_DATASET!=it2)
+ if (H5I_DATASET != it1 || H5I_DATASET != it2)
return FAIL;
/*-------------------------------------------------------------------------
@@ -1040,7 +1039,7 @@ htri_t H5DSis_attached(hid_t did,
goto out;
/* read */
- if (H5Aread(aid,tid,buf) < 0)
+ if (H5Aread(aid, tid, buf) < 0)
goto out;
/* iterate all the REFs in this dimension IDX */
@@ -1050,7 +1049,7 @@ htri_t H5DSis_attached(hid_t did,
ref = ((hobj_ref_t *)buf[idx].p)[i];
/* get the scale id for this REF */
- if ((dsid_j = H5Rdereference2(did,H5P_DEFAULT,H5R_OBJECT,&ref)) < 0)
+ if ((dsid_j = H5Rdereference2(did, H5P_DEFAULT, H5R_OBJECT, &ref)) < 0)
goto out;
/* get info for DS in the parameter list */
@@ -1073,7 +1072,7 @@ htri_t H5DSis_attached(hid_t did,
/* close */
- if (H5Dvlen_reclaim(tid,sid,H5P_DEFAULT,buf) < 0)
+ if (H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf) < 0)
goto out;
if (H5Sclose(sid) < 0)
goto out;
@@ -1123,7 +1122,7 @@ htri_t H5DSis_attached(hid_t did,
if (dsbuf == NULL)
goto out;
- if (H5Aread(aid,ntid,dsbuf) < 0)
+ if (H5Aread(aid, ntid, dsbuf) < 0)
goto out;
/*-------------------------------------------------------------------------
@@ -1131,7 +1130,7 @@ htri_t H5DSis_attached(hid_t did,
*-------------------------------------------------------------------------
*/
- for(i=0; i<nelmts; i++)
+ for(i = 0; i < nelmts; i++)
{
/* get the reference */
ref = dsbuf[i].ref;
diff --git a/hl/src/H5IM.c b/hl/src/H5IM.c
index a4818b8..2a7ed9b 100644
--- a/hl/src/H5IM.c
+++ b/hl/src/H5IM.c
@@ -44,7 +44,7 @@ herr_t H5IMmake_image_8bit( hid_t loc_id,
hsize_t dims[IMAGE8_RANK];
/* check the arguments */
- if (dset_name == NULL)
+ if (dset_name == NULL)
return -1;
/* Initialize the image dimensions */
@@ -104,9 +104,9 @@ herr_t H5IMmake_image_24bit( hid_t loc_id,
hsize_t dims[IMAGE24_RANK];
/* check the arguments */
- if (interlace == NULL)
+ if (interlace == NULL)
return -1;
- if (dset_name == NULL)
+ if (dset_name == NULL)
return -1;
@@ -180,7 +180,7 @@ static herr_t find_palette(hid_t loc_id,
int ret = H5_ITER_CONT;
/* check the arguments */
- if (name == NULL)
+ if (name == NULL)
return -1;
/* Shut compiler up */
@@ -261,9 +261,9 @@ herr_t H5IMget_image_info( hid_t loc_id,
int has_attr;
/* check the arguments */
- if (dset_name == NULL)
+ if (dset_name == NULL)
return -1;
- if (interlace == NULL)
+ if (interlace == NULL)
return -1;
/*assume initially we have no palettes attached*/
@@ -430,7 +430,7 @@ herr_t H5IMread_image( hid_t loc_id,
hid_t did;
/* check the arguments */
- if (dset_name == NULL)
+ if (dset_name == NULL)
return -1;
/* Open the dataset. */
@@ -483,7 +483,7 @@ herr_t H5IMmake_palette( hid_t loc_id,
int has_pal;
/* check the arguments */
- if (pal_name == NULL)
+ if (pal_name == NULL)
return -1;
/* Check if the dataset already exists */
@@ -548,11 +548,11 @@ herr_t H5IMlink_palette( hid_t loc_id,
hsize_t dim_ref;
int ok_pal;
-
+
/* check the arguments */
- if (image_name == NULL)
+ if (image_name == NULL)
return -1;
- if (pal_name == NULL)
+ if (pal_name == NULL)
return -1;
/* The image dataset may or may not have the attribute "PALETTE"
@@ -717,9 +717,9 @@ herr_t H5IMunlink_palette( hid_t loc_id,
int ok_pal, has_pal;
/* check the arguments */
- if(image_name == NULL)
+ if(image_name == NULL)
return -1;
- if(pal_name == NULL)
+ if(pal_name == NULL)
return -1;
/* Try to find the palette dataset */
@@ -818,7 +818,7 @@ herr_t H5IMget_npalettes( hid_t loc_id,
int has_pal;
/* check the arguments */
- if(image_name == NULL)
+ if(image_name == NULL)
return -1;
/*assume initially we have no palettes attached*/
@@ -916,7 +916,7 @@ herr_t H5IMget_palette_info( hid_t loc_id,
hsize_t pal_maxdims[2];
/* check the arguments */
- if (image_name == NULL)
+ if (image_name == NULL)
return -1;
/* Open the dataset. */
@@ -1030,9 +1030,9 @@ herr_t H5IMget_palette( hid_t loc_id,
hid_t pal_id;
/* check the arguments */
- if (image_name == NULL)
+ if (image_name == NULL)
return -1;
- if (pal_data == NULL)
+ if (pal_data == NULL)
return -1;
@@ -1133,7 +1133,7 @@ herr_t H5IMis_image( hid_t loc_id,
herr_t ret;
/* check the arguments */
- if (dset_name == NULL)
+ if (dset_name == NULL)
return -1;
/* Assume initially fail condition */
@@ -1237,7 +1237,7 @@ herr_t H5IMis_palette( hid_t loc_id,
herr_t ret;
/* check the arguments */
- if (dset_name == NULL)
+ if (dset_name == NULL)
return -1;
/* Assume initially fail condition */
diff --git a/hl/src/H5LD.c b/hl/src/H5LD.c
index 1669a30..3106ea8 100644
--- a/hl/src/H5LD.c
+++ b/hl/src/H5LD.c
@@ -209,7 +209,7 @@ H5LD_construct_vector(char *fields, H5LD_memb_t *listv[]/*OUT*/, hid_t par_tid)
valid = FALSE;
end_of_fields = TRUE;
break;
-
+
case '\\': /* escape character */
++fields_ptr; /* skip it */
if(*fields_ptr == '\0')
@@ -241,7 +241,7 @@ H5LD_construct_vector(char *fields, H5LD_memb_t *listv[]/*OUT*/, hid_t par_tid)
gotcomma = TRUE;
break;
- default:
+ default:
*cur++ = *fields_ptr++;
gotmember = TRUE;
break;
@@ -438,7 +438,7 @@ H5LD_get_dset_elmts(hid_t did, const hsize_t *prev_dims, const hsize_t *cur_dims
/* Get dataset's dataspace */
if((sid = H5Dget_space(did)) < 0)
goto done;
-
+
/* Get the number of dimensions */
if((ndims = H5Sget_simple_extent_ndims(sid)) < 0)
goto done;
@@ -508,7 +508,7 @@ H5LD_get_dset_elmts(hid_t did, const hsize_t *prev_dims, const hsize_t *cur_dims
/* Get the total size of the dataset's datatypes */
if(0 == (tot_tsize = H5LD_get_dset_type_size(did, NULL)))
goto done;
-
+
/* Allocate memory for reading in the elements in the dataset selection */
if(NULL == (sav_buf = tmp_buf = (char *)HDcalloc((size_t)num_elmts, tot_tsize)))
goto done;
diff --git a/hl/src/H5LT.c b/hl/src/H5LT.c
index 0074d02..5d16d67 100644
--- a/hl/src/H5LT.c
+++ b/hl/src/H5LT.c
@@ -29,19 +29,19 @@ char *myinput;
size_t indent = 0;
-/* File Image operations
-
- A file image is a representation of an HDF5 file in a memory
- buffer. In order to perform operations on an image in a similar way
+/* File Image operations
+
+ A file image is a representation of an HDF5 file in a memory
+ buffer. In order to perform operations on an image in a similar way
to a file, the application buffer is copied to a FAPL buffer, which
- in turn is copied to a VFD buffer. Buffer copying can decrease
- performance, especially when using large file images. A solution to
- this issue is to simulate the copying of the application buffer,
- when actually the same buffer is used for the FAPL and the VFD.
- This is implemented by using callbacks that simulate the standard
- functions for memory management (additional callbacks are used for
- the management of associated data structures). From the application
- standpoint, a file handle can be obtained from a file image by using
+ in turn is copied to a VFD buffer. Buffer copying can decrease
+ performance, especially when using large file images. A solution to
+ this issue is to simulate the copying of the application buffer,
+ when actually the same buffer is used for the FAPL and the VFD.
+ This is implemented by using callbacks that simulate the standard
+ functions for memory management (additional callbacks are used for
+ the management of associated data structures). From the application
+ standpoint, a file handle can be obtained from a file image by using
the API routine H5LTopen_file_image(). This function takes a flag
argument that indicates the HDF5 library how to handle the given image;
several flag values can be combined by using the bitwise OR operator.
@@ -61,9 +61,9 @@ size_t indent = 0;
well. The application is responsible to release the image buffer.
*/
-/* Data structure to pass application data to callbacks. */
+/* Data structure to pass application data to callbacks. */
typedef struct {
- void *app_image_ptr; /* Pointer to application buffer */
+ void *app_image_ptr; /* Pointer to application buffer */
size_t app_image_size; /* Size of application buffer */
void *fapl_image_ptr; /* Pointer to FAPL buffer */
size_t fapl_image_size; /* Size of FAPL buffer */
@@ -88,17 +88,17 @@ static herr_t udata_free(void *udata);
/*-------------------------------------------------------------------------
-* Function: image_malloc
+* Function: image_malloc
*
* Purpose: Simulates malloc() function to avoid copying file images.
* The application buffer is set to the buffer on only one FAPL.
* Then the FAPL buffer can be copied to other FAPL buffers or
-* to only one VFD buffer.
+* to only one VFD buffer.
*
* Return: Address of "allocated" buffer, if successful. Otherwise, it returns
* NULL.
*
-* Programmer: Christian Chilan
+* Programmer: Christian Chilan
*
* Date: October 3, 2011
*
@@ -109,23 +109,23 @@ image_malloc(size_t size, H5FD_file_image_op_t file_image_op, void *_udata)
{
H5LT_file_image_ud_t *udata = (H5LT_file_image_ud_t *)_udata;
void * return_value = NULL;
-
+
/* callback is only used if the application buffer is not actually copied */
- if (!(udata->flags & H5LT_FILE_IMAGE_DONT_COPY))
+ if (!(udata->flags & H5LT_FILE_IMAGE_DONT_COPY))
goto out;
switch ( file_image_op ) {
/* the app buffer is "copied" to only one FAPL. Afterwards, FAPLs can be "copied" */
case H5FD_FILE_IMAGE_OP_PROPERTY_LIST_SET:
- if (udata->app_image_ptr == NULL)
+ if (udata->app_image_ptr == NULL)
goto out;
- if (udata->app_image_size != size)
+ if (udata->app_image_size != size)
goto out;
- if (udata->fapl_image_ptr != NULL)
+ if (udata->fapl_image_ptr != NULL)
goto out;
- if (udata->fapl_image_size != 0)
+ if (udata->fapl_image_size != 0)
goto out;
- if (udata->fapl_ref_count != 0)
+ if (udata->fapl_ref_count != 0)
goto out;
udata->fapl_image_ptr = udata->app_image_ptr;
@@ -135,11 +135,11 @@ image_malloc(size_t size, H5FD_file_image_op_t file_image_op, void *_udata)
break;
case H5FD_FILE_IMAGE_OP_PROPERTY_LIST_COPY:
- if (udata->fapl_image_ptr == NULL)
+ if (udata->fapl_image_ptr == NULL)
goto out;
- if (udata->fapl_image_size != size)
+ if (udata->fapl_image_size != size)
goto out;
- if (udata->fapl_ref_count == 0)
+ if (udata->fapl_ref_count == 0)
goto out;
return_value = udata->fapl_image_ptr;
@@ -151,17 +151,17 @@ image_malloc(size_t size, H5FD_file_image_op_t file_image_op, void *_udata)
case H5FD_FILE_IMAGE_OP_FILE_OPEN:
/* FAPL buffer is "copied" to only one VFD buffer */
- if (udata->vfd_image_ptr != NULL)
+ if (udata->vfd_image_ptr != NULL)
goto out;
- if (udata->vfd_image_size != 0)
+ if (udata->vfd_image_size != 0)
goto out;
- if (udata->vfd_ref_count != 0)
+ if (udata->vfd_ref_count != 0)
goto out;
- if (udata->fapl_image_ptr == NULL)
+ if (udata->fapl_image_ptr == NULL)
goto out;
- if (udata->fapl_image_size != size)
+ if (udata->fapl_image_size != size)
goto out;
- if (udata->fapl_ref_count == 0)
+ if (udata->fapl_ref_count == 0)
goto out;
udata->vfd_image_ptr = udata->fapl_image_ptr;
@@ -189,15 +189,15 @@ out:
/*-------------------------------------------------------------------------
* Function: image_memcpy
*
-* Purpose: Simulates memcpy() function to avoid copying file images.
+* Purpose: Simulates memcpy() function to avoid copying file images.
* The image buffer can be set to only one FAPL buffer, and
* "copied" to only one VFD buffer. The FAPL buffer can be
-* "copied" to other FAPLs buffers.
+* "copied" to other FAPLs buffers.
*
* Return: The address of the destination buffer, if successful. Otherwise, it
* returns NULL.
*
-* Programmer: Christian Chilan
+* Programmer: Christian Chilan
*
* Date: October 3, 2011
*
@@ -210,31 +210,31 @@ image_memcpy(void *dest, const void *src, size_t size, H5FD_file_image_op_t file
H5LT_file_image_ud_t *udata = (H5LT_file_image_ud_t *)_udata;
/* callback is only used if the application buffer is not actually copied */
- if (!(udata->flags & H5LT_FILE_IMAGE_DONT_COPY))
+ if (!(udata->flags & H5LT_FILE_IMAGE_DONT_COPY))
goto out;
switch(file_image_op) {
case H5FD_FILE_IMAGE_OP_PROPERTY_LIST_SET:
- if (dest != udata->fapl_image_ptr)
+ if (dest != udata->fapl_image_ptr)
goto out;
- if (src != udata->app_image_ptr)
+ if (src != udata->app_image_ptr)
goto out;
- if (size != udata->fapl_image_size)
+ if (size != udata->fapl_image_size)
goto out;
- if (size != udata->app_image_size)
+ if (size != udata->app_image_size)
goto out;
- if (udata->fapl_ref_count == 0)
+ if (udata->fapl_ref_count == 0)
goto out;
break;
case H5FD_FILE_IMAGE_OP_PROPERTY_LIST_COPY:
- if (dest != udata->fapl_image_ptr)
+ if (dest != udata->fapl_image_ptr)
goto out;
- if (src != udata->fapl_image_ptr)
+ if (src != udata->fapl_image_ptr)
goto out;
- if (size != udata->fapl_image_size)
+ if (size != udata->fapl_image_size)
goto out;
- if (udata->fapl_ref_count < 2)
+ if (udata->fapl_ref_count < 2)
goto out;
break;
@@ -242,17 +242,17 @@ image_memcpy(void *dest, const void *src, size_t size, H5FD_file_image_op_t file
goto out;
case H5FD_FILE_IMAGE_OP_FILE_OPEN:
- if (dest != udata->vfd_image_ptr)
+ if (dest != udata->vfd_image_ptr)
goto out;
- if (src != udata->fapl_image_ptr)
+ if (src != udata->fapl_image_ptr)
goto out;
- if (size != udata->vfd_image_size)
+ if (size != udata->vfd_image_size)
goto out;
- if (size != udata->fapl_image_size)
+ if (size != udata->fapl_image_size)
goto out;
- if (udata->fapl_ref_count == 0)
+ if (udata->fapl_ref_count == 0)
goto out;
- if (udata->vfd_ref_count != 1)
+ if (udata->vfd_ref_count != 1)
goto out;
break;
@@ -273,15 +273,15 @@ out:
/*-------------------------------------------------------------------------
-* Function: image_realloc
+* Function: image_realloc
*
* Purpose: Reallocates the shared application image buffer and updates data
-* structures that manage buffer "copying".
-*
+* structures that manage buffer "copying".
+*
* Return: Address of reallocated buffer, if successful. Otherwise, it returns
-* NULL.
+* NULL.
*
-* Programmer: Christian Chilan
+* Programmer: Christian Chilan
*
* Date: October 3, 2011
*
@@ -294,29 +294,29 @@ image_realloc(void *ptr, size_t size, H5FD_file_image_op_t file_image_op, void *
void * return_value = NULL;
/* callback is only used if the application buffer is not actually copied */
- if (!(udata->flags & H5LT_FILE_IMAGE_DONT_COPY))
+ if (!(udata->flags & H5LT_FILE_IMAGE_DONT_COPY))
goto out;
- /* realloc() is not allowed when the HDF5 library won't release the image
+ /* realloc() is not allowed when the HDF5 library won't release the image
buffer because reallocation may change the address of the buffer. The
new address cannot be communicated to the application to release it. */
- if (udata->flags & H5LT_FILE_IMAGE_DONT_RELEASE)
- goto out;
+ if (udata->flags & H5LT_FILE_IMAGE_DONT_RELEASE)
+ goto out;
/* realloc() is not allowed if the image is open in read-only mode */
- if (!(udata->flags & H5LT_FILE_IMAGE_OPEN_RW))
- goto out;
+ if (!(udata->flags & H5LT_FILE_IMAGE_OPEN_RW))
+ goto out;
if (file_image_op == H5FD_FILE_IMAGE_OP_FILE_RESIZE) {
- if (udata->vfd_image_ptr != ptr)
- goto out;
+ if (udata->vfd_image_ptr != ptr)
+ goto out;
- if (udata->vfd_ref_count != 1)
+ if (udata->vfd_ref_count != 1)
goto out;
if (NULL == (udata->vfd_image_ptr = HDrealloc(ptr, size)))
- goto out;
-
+ goto out;
+
udata->vfd_image_size = size;
return_value = udata->vfd_image_ptr;
} /* end if */
@@ -337,9 +337,9 @@ out:
* reference counters. Shared application buffer is actually
* deallocated if there are no outstanding references.
*
-* Return: SUCCEED or FAIL
+* Return: SUCCEED or FAIL
*
-* Programmer: Christian Chilan
+* Programmer: Christian Chilan
*
* Date: October 3, 2011
*
@@ -351,19 +351,19 @@ image_free(void *ptr, H5FD_file_image_op_t file_image_op, void *_udata)
H5LT_file_image_ud_t *udata = (H5LT_file_image_ud_t *)_udata;
/* callback is only used if the application buffer is not actually copied */
- if (!(udata->flags & H5LT_FILE_IMAGE_DONT_COPY))
+ if (!(udata->flags & H5LT_FILE_IMAGE_DONT_COPY))
goto out;
switch(file_image_op) {
case H5FD_FILE_IMAGE_OP_PROPERTY_LIST_CLOSE:
- if (udata->fapl_image_ptr != ptr)
+ if (udata->fapl_image_ptr != ptr)
goto out;
- if (udata->fapl_ref_count == 0)
+ if (udata->fapl_ref_count == 0)
goto out;
udata->fapl_ref_count--;
- /* release the shared buffer only if indicated by the respective flag and there are no outstanding references */
+ /* release the shared buffer only if indicated by the respective flag and there are no outstanding references */
if (udata->fapl_ref_count == 0 && udata->vfd_ref_count == 0 &&
!(udata->flags & H5LT_FILE_IMAGE_DONT_RELEASE)) {
HDfree(udata->fapl_image_ptr);
@@ -374,14 +374,14 @@ image_free(void *ptr, H5FD_file_image_op_t file_image_op, void *_udata)
break;
case H5FD_FILE_IMAGE_OP_FILE_CLOSE:
- if (udata->vfd_image_ptr != ptr)
+ if (udata->vfd_image_ptr != ptr)
goto out;
- if (udata->vfd_ref_count != 1)
+ if (udata->vfd_ref_count != 1)
goto out;
udata->vfd_ref_count--;
- /* release the shared buffer only if indicated by the respective flag and there are no outstanding references */
+ /* release the shared buffer only if indicated by the respective flag and there are no outstanding references */
if (udata->fapl_ref_count == 0 && udata->vfd_ref_count == 0 &&
!(udata->flags & H5LT_FILE_IMAGE_DONT_RELEASE)) {
HDfree(udata->vfd_image_ptr);
@@ -410,7 +410,7 @@ out:
/*-------------------------------------------------------------------------
-* Function: udata_copy
+* Function: udata_copy
*
* Purpose: Simulates the copying of the user data structure utilized in the
* management of the "copying" of file images.
@@ -418,7 +418,7 @@ out:
* Return: Address of "newly allocated" structure, if successful. Otherwise, it
* returns NULL.
*
-* Programmer: Christian Chilan
+* Programmer: Christian Chilan
*
* Date: October 3, 2011
*
@@ -430,9 +430,9 @@ udata_copy(void *_udata)
H5LT_file_image_ud_t *udata = (H5LT_file_image_ud_t *)_udata;
/* callback is only used if the application buffer is not actually copied */
- if (!(udata->flags & H5LT_FILE_IMAGE_DONT_COPY))
+ if (!(udata->flags & H5LT_FILE_IMAGE_DONT_COPY))
goto out;
- if (udata->ref_count == 0)
+ if (udata->ref_count == 0)
goto out;
udata->ref_count++;
@@ -449,11 +449,11 @@ out:
*
* Purpose: Simulates deallocation of the user data structure utilized in the
* management of the "copying" of file images. The data structure is
-* actually deallocated when there are no outstanding references.
+* actually deallocated when there are no outstanding references.
*
-* Return: SUCCEED or FAIL
+* Return: SUCCEED or FAIL
*
-* Programmer: Christian Chilan
+* Programmer: Christian Chilan
*
* Date: October 3, 2011
*
@@ -465,9 +465,9 @@ udata_free(void *_udata)
H5LT_file_image_ud_t *udata = (H5LT_file_image_ud_t *)_udata;
/* callback is only used if the application buffer is not actually copied */
- if (!(udata->flags & H5LT_FILE_IMAGE_DONT_COPY))
+ if (!(udata->flags & H5LT_FILE_IMAGE_DONT_COPY))
goto out;
- if (udata->ref_count == 0)
+ if (udata->ref_count == 0)
goto out;
udata->ref_count--;
@@ -479,7 +479,7 @@ udata_free(void *_udata)
return(SUCCEED);
-out:
+out:
return(FAIL);
} /* end udata_free */
@@ -522,7 +522,7 @@ H5LT_make_dataset_numerical( hid_t loc_id,
hid_t did = -1, sid = -1;
/* check the arguments */
- if (dset_name == NULL)
+ if (dset_name == NULL)
return -1;
/* Create the data space for the dataset. */
@@ -801,7 +801,7 @@ herr_t H5LTmake_dataset_string(hid_t loc_id,
size_t size;
/* check the arguments */
- if (dset_name == NULL)
+ if (dset_name == NULL)
return -1;
/* create a string data type */
@@ -852,11 +852,11 @@ out:
/*-------------------------------------------------------------------------
* Function: H5LTopen_file_image
*
-* Purpose: Open a user supplied file image using the core file driver.
+* Purpose: Open a user supplied file image using the core file driver.
*
* Return: File identifier, Failure: -1
*
-* Programmer: Christian Chilan
+* Programmer: Christian Chilan
*
* Date: October 3, 2011
*
@@ -871,22 +871,22 @@ hid_t H5LTopen_file_image(void *buf_ptr, size_t buf_size, unsigned flags)
size_t min_incr = 65536; /* Minimum buffer increment */
double buf_prcnt = 0.1f; /* Percentage of buffer size to set
as increment */
- static long file_name_counter;
- H5FD_file_image_callbacks_t callbacks = {&image_malloc, &image_memcpy,
- &image_realloc, &image_free,
- &udata_copy, &udata_free,
+ static long file_name_counter;
+ H5FD_file_image_callbacks_t callbacks = {&image_malloc, &image_memcpy,
+ &image_realloc, &image_free,
+ &udata_copy, &udata_free,
(void *)NULL};
/* check arguments */
- if (buf_ptr == NULL)
+ if (buf_ptr == NULL)
goto out;
- if (buf_size == 0)
+ if (buf_size == 0)
goto out;
if (flags & (unsigned)~(H5LT_FILE_IMAGE_ALL))
goto out;
/* Create FAPL to transmit file image */
- if ((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0)
+ if ((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0)
goto out;
/* set allocation increment to a percentage of the supplied buffer size, or
@@ -898,7 +898,7 @@ hid_t H5LTopen_file_image(void *buf_ptr, size_t buf_size, unsigned flags)
alloc_incr = min_incr;
/* Configure FAPL to use the core file driver */
- if (H5Pset_fapl_core(fapl, alloc_incr, FALSE) < 0)
+ if (H5Pset_fapl_core(fapl, alloc_incr, FALSE) < 0)
goto out;
/* Set callbacks for file image ops ONLY if the file image is NOT copied */
@@ -932,10 +932,10 @@ hid_t H5LTopen_file_image(void *buf_ptr, size_t buf_size, unsigned flags)
} /* end if */
/* Assign file image in user buffer to FAPL */
- if (H5Pset_file_image(fapl, buf_ptr, buf_size) < 0)
+ if (H5Pset_file_image(fapl, buf_ptr, buf_size) < 0)
goto out;
- /* set file open flags */
+ /* set file open flags */
if (flags & H5LT_FILE_IMAGE_OPEN_RW)
file_open_flags = H5F_ACC_RDWR;
else
@@ -943,17 +943,17 @@ hid_t H5LTopen_file_image(void *buf_ptr, size_t buf_size, unsigned flags)
/* define a unique file name */
HDsnprintf(file_name, (sizeof(file_name) - 1), "file_image_%ld", file_name_counter++);
-
- /* Assign file image in FAPL to the core file driver */
- if ((file_id = H5Fopen(file_name, file_open_flags, fapl)) < 0)
+
+ /* Assign file image in FAPL to the core file driver */
+ if ((file_id = H5Fopen(file_name, file_open_flags, fapl)) < 0)
goto out;
/* Close FAPL */
- if (H5Pclose(fapl) < 0)
+ if (H5Pclose(fapl) < 0)
goto out;
- /* Return file identifier */
- return file_id;
+ /* Return file identifier */
+ return file_id;
out:
H5E_BEGIN_TRY {
@@ -983,7 +983,7 @@ H5LT_read_dataset_numerical(hid_t loc_id, const char *dset_name, hid_t tid, void
hid_t did;
/* check the arguments */
- if (dset_name == NULL)
+ if (dset_name == NULL)
return -1;
/* Open the dataset. */
@@ -1178,7 +1178,7 @@ herr_t H5LTread_dataset_string( hid_t loc_id,
hid_t tid = -1;
/* check the arguments */
- if (dset_name == NULL)
+ if (dset_name == NULL)
return -1;
/* Open the dataset. */
@@ -1231,7 +1231,7 @@ herr_t H5LTget_dataset_ndims( hid_t loc_id,
hid_t sid = -1;
/* check the arguments */
- if (dset_name == NULL)
+ if (dset_name == NULL)
return -1;
/* Open the dataset. */
@@ -1291,7 +1291,7 @@ herr_t H5LTget_dataset_info( hid_t loc_id,
hid_t sid = -1;
/* check the arguments */
- if (dset_name == NULL)
+ if (dset_name == NULL)
return -1;
/* open the dataset. */
@@ -1368,9 +1368,9 @@ find_dataset(hid_t loc_id, const char *name, const H5L_info_t *linfo, void *op_d
int ret = 0;
/* check the arguments */
- if (name == NULL)
+ if (name == NULL)
return ret;
-
+
/* Shut the compiler up */
loc_id = loc_id;
linfo = linfo;
@@ -1407,13 +1407,18 @@ find_dataset(hid_t loc_id, const char *name, const H5L_info_t *linfo, void *op_d
*
*-------------------------------------------------------------------------
*/
-
+/* H5Literate wants a non-const pointer but we have a const pointer in the API
+ * call. It's safe to ignore this because we control the callback, don't
+ * modify the op_data buffer (i.e.: dset_name) during the traversal, and the
+ * library never modifies that buffer.
+ */
+H5_GCC_DIAG_OFF(cast-qual)
herr_t
H5LTfind_dataset( hid_t loc_id, const char *dset_name )
{
return H5Literate(loc_id, H5_INDEX_NAME, H5_ITER_INC, 0, find_dataset, (void *)dset_name);
}
-
+H5_GCC_DIAG_ON(cast-qual)
/*-------------------------------------------------------------------------
*
@@ -1455,11 +1460,11 @@ herr_t H5LTset_attribute_string( hid_t loc_id,
size_t attr_size;
/* check the arguments */
- if (obj_name == NULL)
+ if (obj_name == NULL)
return -1;
- if (attr_name == NULL)
+ if (attr_name == NULL)
return -1;
- if (attr_data == NULL)
+ if (attr_data == NULL)
return -1;
/* Open the object */
@@ -1552,9 +1557,9 @@ herr_t H5LT_set_attribute_numerical( hid_t loc_id,
int has_attr;
/* check the arguments */
- if (obj_name == NULL)
+ if (obj_name == NULL)
return -1;
- if (attr_name == NULL)
+ if (attr_name == NULL)
return -1;
/* Open the object */
@@ -1969,7 +1974,7 @@ find_attr(hid_t loc_id, const char *name, const H5A_info_t *ainfo,
int ret = H5_ITER_CONT;
/* check the arguments */
- if (name == NULL)
+ if (name == NULL)
return H5_ITER_CONT;
/* Shut compiler up */
@@ -2033,13 +2038,18 @@ herr_t H5LTfind_attribute( hid_t loc_id, const char* attr_name )
*
*-------------------------------------------------------------------------
*/
-
+/* H5Aiterate wants a non-const pointer but we have a const pointer in the API
+ * call. It's safe to ignore this because we control the callback, don't
+ * modify the op_data buffer (i.e.: attr_name) during the traversal, and the
+ * library never modifies that buffer.
+ */
+H5_GCC_DIAG_OFF(cast-qual)
herr_t
H5LT_find_attribute( hid_t loc_id, const char* attr_name )
{
return H5Aiterate2(loc_id, H5_INDEX_NAME, H5_ITER_INC, NULL, find_attr, (void *)attr_name);
}
-
+H5_GCC_DIAG_ON(cast-qual)
/*-------------------------------------------------------------------------
@@ -2066,9 +2076,9 @@ herr_t H5LTget_attribute_ndims( hid_t loc_id,
hid_t obj_id;
/* check the arguments */
- if (obj_name == NULL)
+ if (obj_name == NULL)
return -1;
- if (attr_name == NULL)
+ if (attr_name == NULL)
return -1;
/* Open the object */
@@ -2139,9 +2149,9 @@ herr_t H5LTget_attribute_info( hid_t loc_id,
hid_t obj_id;
/* check the arguments */
- if (obj_name == NULL)
+ if (obj_name == NULL)
return -1;
- if (attr_name == NULL)
+ if (attr_name == NULL)
return -1;
/* Open the object */
@@ -2220,7 +2230,7 @@ hid_t H5LTtext_to_dtype(const char *text, H5LT_lang_t lang_type)
hid_t type_id;
/* check the arguments */
- if (text == NULL)
+ if (text == NULL)
return -1;
if(lang_type <= H5LT_LANG_ERR || lang_type >= H5LT_NO_LANG)
@@ -2263,8 +2273,8 @@ out:
*
*-------------------------------------------------------------------------
*/
-static char*
-realloc_and_append(hbool_t _no_user_buf, size_t *len, char *buf, char *str_to_add)
+static char*
+realloc_and_append(hbool_t _no_user_buf, size_t *len, char *buf, const char *str_to_add)
{
size_t size_str_to_add, size_str;
@@ -2288,7 +2298,7 @@ realloc_and_append(hbool_t _no_user_buf, size_t *len, char *buf, char *str_to_ad
/* find the size of the current buffer */
size_str = HDstrlen(buf);
- /* Check to make sure the appended string does not
+ /* Check to make sure the appended string does not
* extend past the allocated buffer; if it does then truncate the string
*/
if(size_str < *len - 1) {
@@ -2360,7 +2370,6 @@ print_enum(hid_t type, char* str, size_t *str_len, hbool_t no_ubuf, size_t indt)
{
char **name = NULL; /*member names */
unsigned char *value = NULL; /*value array */
- unsigned char *copy = NULL; /*a pointer to value array */
int nmembs; /*number of members */
char tmp_str[TMP_LEN];
int nchars; /*number of output characters */
@@ -2418,17 +2427,15 @@ print_enum(hid_t type, char* str, size_t *str_len, hbool_t no_ubuf, size_t indt)
nchars = HDsnprintf(tmp_str, TMP_LEN, "\"%s\"", name[i]);
if(!(str = realloc_and_append(no_ubuf, str_len, str, tmp_str)))
goto out;
- HDsnprintf(tmp_str, TMP_LEN, "%*s ", MAX(0, 16 - nchars), "");
+ HDmemset(tmp_str, ' ', (size_t)MAX(3, 19 - nchars) + 1);
+ tmp_str[MAX(3, 19 - nchars)] = '\0';
if(!(str = realloc_and_append(no_ubuf, str_len, str, tmp_str)))
goto out;
- /*On SGI Altix(cobalt), wrong values were printed out with "value+i*dst_size"
- *strangely, unless use another pointer "copy".*/
- copy = value + (size_t)i * dst_size;
if (H5T_SGN_NONE == H5Tget_sign(native))
- HDsnprintf(tmp_str, TMP_LEN, "%u", *((unsigned int*)((void *)copy)));
+ HDsnprintf(tmp_str, TMP_LEN, "%u", *((unsigned int *)((void *)(value + (size_t)i * dst_size))));
else
- HDsnprintf(tmp_str, TMP_LEN, "%d", *((int*)((void *)copy)));
+ HDsnprintf(tmp_str, TMP_LEN, "%d", *((int *)((void *)(value + (size_t)i * dst_size))));
if(!(str = realloc_and_append(no_ubuf, str_len, str, tmp_str)))
goto out;
@@ -2450,8 +2457,12 @@ print_enum(hid_t type, char* str, size_t *str_len, hbool_t no_ubuf, size_t indt)
out:
if(0 == nmembs) {
- HDsnprintf(tmp_str, TMP_LEN, "\n%*s <empty>", (int)(indt + 4), "");
+ str = realloc_and_append(no_ubuf, str_len, str, "\n");
+ HDassert((indt + 4) < TMP_LEN);
+ HDmemset(tmp_str, ' ', (indt + 4) + 1);
+ tmp_str[(indt + 4)] = '\0';
str = realloc_and_append(no_ubuf, str_len, str, tmp_str);
+ str = realloc_and_append(no_ubuf, str_len, str, " <empty>");
} /* end if */
/* Release resources */
@@ -2544,7 +2555,7 @@ char* H5LT_dtype_to_text(hid_t dtype, char *dt_str, H5LT_lang_t lang, size_t *sl
if(!(dt_str = realloc_and_append(no_user_buf, slen, dt_str, NULL)))
goto out;
-
+
if(lang != H5LT_DDL) {
HDsnprintf(dt_str, *slen, "only DDL is supported for now");
goto out;
@@ -3111,9 +3122,9 @@ herr_t H5LTget_attribute_string( hid_t loc_id,
hid_t obj_id;
/* check the arguments */
- if (obj_name == NULL)
+ if (obj_name == NULL)
return -1;
- if (attr_name == NULL)
+ if (attr_name == NULL)
return -1;
/* Open the object */
@@ -3121,9 +3132,9 @@ herr_t H5LTget_attribute_string( hid_t loc_id,
return -1;
/* Get the attribute */
- if ( H5LT_get_attribute_disk( obj_id, attr_name, data ) < 0 )
+ if ( H5LT_get_attribute_disk( obj_id, attr_name, data ) < 0 )
{
- H5Oclose(obj_id);
+ H5Oclose(obj_id);
return -1;
}
@@ -3537,9 +3548,9 @@ static herr_t H5LT_get_attribute_mem(hid_t loc_id,
hid_t attr_id = -1;
/* check the arguments */
- if (obj_name == NULL)
+ if (obj_name == NULL)
return -1;
- if (attr_name == NULL)
+ if (attr_name == NULL)
return -1;
/* Open the object */
@@ -3779,7 +3790,7 @@ H5LTpath_valid(hid_t loc_id, const char *path, hbool_t check_object_valid)
ret_value = FALSE;
goto done;
}
-
+
/* Determine if link resolves to an actual object */
if((obj_exists = H5Oexists_by_name(loc_id, tmp_path, H5P_DEFAULT)) < 0) {
ret_value = FAIL;
diff --git a/hl/src/H5LTpublic.h b/hl/src/H5LTpublic.h
index 47be98a..6df7c4b 100644
--- a/hl/src/H5LTpublic.h
+++ b/hl/src/H5LTpublic.h
@@ -20,7 +20,7 @@
/* user supplied image buffer. The same image is open with the core driver. */
#define H5LT_FILE_IMAGE_DONT_RELEASE 0x0004 /* The HDF5 lib won't */
/* deallocate user supplied image buffer. The user application is reponsible */
-/* for doing so. */
+/* for doing so. */
#define H5LT_FILE_IMAGE_ALL 0x0007
typedef enum H5LT_lang_t {
diff --git a/hl/src/H5TB.c b/hl/src/H5TB.c
index a4bcbd4..c54c41f 100644
--- a/hl/src/H5TB.c
+++ b/hl/src/H5TB.c
@@ -102,7 +102,7 @@ herr_t H5TBmake_table(const char *table_title,
if (field_names == NULL) {
goto out;
}
-
+
dims[0] = nrecords;
dims_chunk[0] = chunk_size;
@@ -300,7 +300,7 @@ herr_t H5TBappend_records(hid_t loc_id,
herr_t ret_val = -1;
/* check the arguments */
- if (dset_name == NULL)
+ if (dset_name == NULL)
goto out;
/* get the original number of records and fields */
@@ -374,7 +374,7 @@ herr_t H5TBwrite_records(hid_t loc_id,
herr_t ret_val = -1;
/* check the arguments */
- if (dset_name == NULL)
+ if (dset_name == NULL)
goto out;
/* open the dataset. */
@@ -477,9 +477,9 @@ herr_t H5TBwrite_fields_name(hid_t loc_id,
herr_t ret_val = -1;
/* check the arguments */
- if (dset_name == NULL)
+ if (dset_name == NULL)
goto out;
- if (field_names == NULL)
+ if (field_names == NULL)
goto out;
/* create xfer properties to preserve initialized data */
@@ -640,7 +640,7 @@ herr_t H5TBwrite_fields_index(hid_t loc_id,
herr_t ret_val = -1;
/* check the arguments */
- if (dset_name == NULL)
+ if (dset_name == NULL)
goto out;
/* create xfer properties to preserve initialized data */
@@ -801,7 +801,7 @@ herr_t H5TBread_table(hid_t loc_id,
herr_t ret_val = -1;
/* check the arguments */
- if (dset_name == NULL)
+ if (dset_name == NULL)
goto out;
/* open the dataset. */
@@ -878,7 +878,7 @@ herr_t H5TBread_records(hid_t loc_id,
herr_t ret_val = -1;
/* check the arguments */
- if (dset_name == NULL)
+ if (dset_name == NULL)
goto out;
/* get the number of records and fields */
@@ -959,9 +959,9 @@ herr_t H5TBread_fields_name(hid_t loc_id,
/* check the arguments */
- if (dset_name == NULL)
+ if (dset_name == NULL)
goto out;
- if (field_names == NULL)
+ if (field_names == NULL)
goto out;
/* open the dataset */
@@ -1029,7 +1029,7 @@ herr_t H5TBread_fields_name(hid_t loc_id,
/* check to make sure field was found, no reason to continue if it does not exist */
if(j == 0)
goto out;
-
+
/* get the dataspace handle */
if((sid = H5Dget_space(did)) < 0)
goto out;
@@ -1121,7 +1121,7 @@ herr_t H5TBread_fields_index(hid_t loc_id,
herr_t ret_val = -1;
/* check the arguments */
- if (dset_name == NULL)
+ if (dset_name == NULL)
goto out;
/* open the dataset. */
@@ -1281,9 +1281,9 @@ herr_t H5TBdelete_record(hid_t loc_id,
unsigned char *tmp_buf = NULL;
herr_t ret_val = -1;
-
+
/* check the arguments */
- if (dset_name == NULL)
+ if (dset_name == NULL)
goto out;
/*-------------------------------------------------------------------------
@@ -1446,7 +1446,7 @@ herr_t H5TBinsert_record(hid_t loc_id,
herr_t ret_val = -1;
/* check the arguments */
- if (dset_name == NULL)
+ if (dset_name == NULL)
goto out;
/*-------------------------------------------------------------------------
@@ -1601,9 +1601,9 @@ herr_t H5TBadd_records_from(hid_t loc_id,
herr_t ret_val = -1;
/* check the arguments */
- if (dset_name1 == NULL)
+ if (dset_name1 == NULL)
goto out;
- if (dset_name2 == NULL)
+ if (dset_name2 == NULL)
goto out;
/*-------------------------------------------------------------------------
@@ -1754,11 +1754,11 @@ herr_t H5TBcombine_tables(hid_t loc_id1,
herr_t ret_val = -1;
/* check the arguments */
- if (dset_name1 == NULL)
+ if (dset_name1 == NULL)
goto out;
- if (dset_name2 == NULL)
+ if (dset_name2 == NULL)
goto out;
- if (dset_name3 == NULL)
+ if (dset_name3 == NULL)
goto out;
/*-------------------------------------------------------------------------
@@ -2117,9 +2117,9 @@ herr_t H5TBinsert_field(hid_t loc_id,
herr_t ret_val = -1;
/* check the arguments */
- if (dset_name == NULL)
+ if (dset_name == NULL)
goto out;
- if (field_name == NULL)
+ if (field_name == NULL)
goto out;
/* get the number of records and fields */
@@ -2532,9 +2532,9 @@ herr_t H5TBdelete_field(hid_t loc_id,
/* check the arguments */
- if (dset_name == NULL)
+ if (dset_name == NULL)
goto out;
- if (field_name == NULL)
+ if (field_name == NULL)
goto out;
/* get the number of records and fields */
@@ -2982,7 +2982,7 @@ htri_t H5TBAget_fill(hid_t loc_id,
htri_t ret_val = -1;
/* check the arguments */
- if (dset_name == NULL)
+ if (dset_name == NULL)
goto out;
/* get the number of records and fields */
@@ -3014,7 +3014,7 @@ htri_t H5TBAget_fill(hid_t loc_id,
out:
if(src_offset)
HDfree(src_offset);
-
+
return ret_val;
} /* end H5TBAget_fill() */
@@ -3054,7 +3054,7 @@ herr_t H5TBget_table_info(hid_t loc_id,
herr_t ret_val = -1;
/* check the arguments */
- if (dset_name == NULL)
+ if (dset_name == NULL)
goto out;
/* open the dataset. */
@@ -3145,7 +3145,7 @@ herr_t H5TBget_field_info(hid_t loc_id,
herr_t ret_val = -1;
/* check the arguments */
- if (dset_name == NULL)
+ if (dset_name == NULL)
goto out;
/* open the dataset. */
@@ -3253,9 +3253,9 @@ hbool_t H5TB_find_field(const char *field, const char *field_list)
const char *end;
/* check the arguments */
- if (field == NULL)
+ if (field == NULL)
return FALSE;
- if (field_list == NULL)
+ if (field_list == NULL)
return FALSE;
while((end = HDstrstr(start, ",")) != 0) {