Merge pull request #501 in HDFFV/hdf5 from ~BYRN/hdf5_adb:develop to develop

* commit 'e4e261173f85de6f83651abd6950793d7b930a20':
  HDFFV-10186 more whitespace formatting
This commit is contained in:
Allen Byrne 2017-05-10 10:46:37 -05:00
commit 9d50ed5287
4 changed files with 229 additions and 281 deletions

View File

@ -218,7 +218,7 @@ Gif2Mem(BYTE *MemGif, GIFTOMEM *GifMemoryStruct)
PlainTextCount++;
if (PlainTextCount > PlainTextArray)
PlainTextArray = (BYTE)((PlainTextArray << 1) + 1);
PlainTextArray = (BYTE)((PlainTextArray << 1) + 1);
if (!(gifPlainText = (GIFPLAINTEXT **)realloc(gifPlainText , sizeof(GIFPLAINTEXT *) * PlainTextArray))) {
printf("Out of memory!");
@ -240,7 +240,7 @@ Gif2Mem(BYTE *MemGif, GIFTOMEM *GifMemoryStruct)
CommentCount++;
if (CommentCount > CommentArray)
CommentArray = (BYTE)((CommentArray << 1) + 1);
CommentArray = (BYTE)((CommentArray << 1) + 1);
if (!(gifComment = (GIFCOMMENT **)realloc(gifComment , sizeof(GIFCOMMENT *) * CommentArray))) {
printf("Out of memory!");
@ -305,7 +305,7 @@ Gif2Mem(BYTE *MemGif, GIFTOMEM *GifMemoryStruct)
ApplicationCount++;
if (ApplicationCount > ApplicationArray)
ApplicationArray = (BYTE)((ApplicationArray << 1) + 1);
ApplicationArray = (BYTE)((ApplicationArray << 1) + 1);
if (!(gifApplication = (GIFAPPLICATION **)realloc(gifApplication , sizeof(GIFAPPLICATION *) * ApplicationArray))) {
printf("Out of memory!");

File diff suppressed because it is too large Load Diff

View File

@ -136,8 +136,8 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void H5_
{
hid_t obj;
herr_t ret = SUCCEED;
char *obj_path = NULL; /* Full path of object */
h5tools_str_t buffer; /* string into which to render */
char *obj_path = NULL; /* Full path of object */
h5tools_str_t buffer; /* string into which to render */
h5tools_context_t ctx; /* print context */
h5tool_format_t *outputformat = &xml_dataformat;
h5tool_format_t string_dataformat;
@ -1951,7 +1951,7 @@ xml_dump_data(hid_t obj_id, int obj_data, struct subset_t H5_ATTR_UNUSED * sset,
else { /* all other data */
/* VL data special information */
unsigned int vl_data = 0; /* contains VL datatypes */
p_type = h5tools_get_native_type(type);
/* Check if we have VL data in the dataset's datatype */

View File

@ -236,7 +236,7 @@ hid_t copy_named_datatype(hid_t type_in, hid_t fidout,
named_dt_t *dt = *named_dt_head_p; /* Stack pointer */
named_dt_t *dt_ret = NULL; /* Datatype to return */
H5O_info_t oinfo; /* Object info of input dtype */
hid_t ret_value = -1; /* The identifier of the named dtype in the out file */
hid_t ret_value = -1; /* The identifier of the named dtype in the out file */
if (H5Oget_info(type_in, &oinfo) < 0)
goto done;
@ -255,9 +255,8 @@ hid_t copy_named_datatype(hid_t type_in, hid_t fidout,
for (i = 0; i < travt->nobjs; i++) {
if (travt->objs[i].type == H5TRAV_TYPE_NAMED_DATATYPE) {
/* Push onto the stack */
if (NULL == (dt = (named_dt_t *) HDmalloc(sizeof(named_dt_t)))) {
if (NULL == (dt = (named_dt_t *)HDmalloc(sizeof(named_dt_t))))
goto done;
}
dt->next = *named_dt_head_p;
*named_dt_head_p = dt;
@ -278,9 +277,8 @@ hid_t copy_named_datatype(hid_t type_in, hid_t fidout,
* possible if the datatype was committed anonymously in the input file. */
if (!dt_ret) {
/* Push the new datatype onto the stack */
if (NULL == (dt_ret = (named_dt_t *) HDmalloc(sizeof(named_dt_t)))) {
if (NULL == (dt_ret = (named_dt_t *)HDmalloc(sizeof(named_dt_t))))
goto done;
}
dt_ret->next = *named_dt_head_p;
*named_dt_head_p = dt_ret;
@ -289,27 +287,26 @@ hid_t copy_named_datatype(hid_t type_in, hid_t fidout,
dt_ret->id_out = -1;
} /* end if */
/* If the requested datatype does not yet exist in the output file, copy it
* anonymously */
if (dt_ret->id_out < 0) {
if (options->use_native == 1)
dt_ret->id_out = h5tools_get_native_type(type_in);
else
dt_ret->id_out = H5Tcopy(type_in);
if (dt_ret->id_out < 0)
goto done;
if (H5Tcommit_anon(fidout, dt_ret->id_out, H5P_DEFAULT, H5P_DEFAULT) < 0)
goto done;
} /* end if */
/* If the requested datatype does not yet exist in the output file, copy it
* anonymously */
if (dt_ret->id_out < 0) {
if (options->use_native == 1)
dt_ret->id_out = h5tools_get_native_type(type_in);
else
dt_ret->id_out = H5Tcopy(type_in);
if (dt_ret->id_out < 0)
goto done;
if (H5Tcommit_anon(fidout, dt_ret->id_out, H5P_DEFAULT, H5P_DEFAULT) < 0)
goto done;
} /* end if */
/* Set return value */
ret_value = dt_ret->id_out;
/* Increment the ref count on id_out, because the calling function will try
* to close it */
if(H5Iinc_ref(ret_value) < 0) {
if(H5Iinc_ref(ret_value) < 0)
ret_value = -1;
}
done:
return (ret_value);
@ -466,7 +463,7 @@ copy_attr(hid_t loc_in, hid_t loc_out, named_dt_t **named_dt_head_p,
int nmembers = H5Tget_nmembers(wtype_id);
for (j = 0; j < nmembers; j++) {
hid_t mtid = H5Tget_member_type(wtype_id, (unsigned) j);
hid_t mtid = H5Tget_member_type(wtype_id, (unsigned)j);
H5T_class_t mtclass = H5Tget_class(mtid);
H5Tclose(mtid);
@ -477,16 +474,13 @@ copy_attr(hid_t loc_in, hid_t loc_out, named_dt_t **named_dt_head_p,
} /* for (j=0; i<nmembers; j++) */
} /* if (type_class == H5T_COMPOUND) */
if (is_ref) {
; /* handled by copy_refs_attr() */
}
else {
if (!is_ref) {
/*-------------------------------------------------------------------------
* read to memory
*-------------------------------------------------------------------------
*/
buf = (void *) HDmalloc((size_t)(nelmts * msize));
buf = (void *)HDmalloc((size_t)(nelmts * msize));
if (buf == NULL) {
error_msg("h5repack", "cannot read into memory\n");
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "HDmalloc failed");