From 74bfe972b557c028eb867b075bea39975b5081e9 Mon Sep 17 00:00:00 2001 From: Raymond Lu Date: Mon, 7 Feb 2005 13:03:41 -0500 Subject: [svn-r9953] Purpose: Minor changes. Description: A little refactoring in tools/h5dump/h5dump.c for the bug fix of wrong byte order of 1-byte integer types. Platforms tested: No test needed, too simple. Misc. update: Added information about the bug fix of wrong byte order of 1-byte integer in RELEASE.txt --- release_docs/RELEASE.txt | 3 +++ tools/h5dump/h5dump.c | 6 +----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 0b1ec30..b833a83 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -70,6 +70,9 @@ Bug Fixes since HDF5-1.6.3 release Library ------- + - The byte order of all 1-byte integer types was fixed as + little-endian even on a big-endian machine. It's corrected. + SLU - 2005/02/07 - Fix segmentation fault when calling H5Fflush with an attribute that hasn't had a value written to it open. QAK - 2004/10/18 - Back up supporting bitfield and time types in H5Tget_native_type. diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c index 242ab67..7c7383c 100644 --- a/tools/h5dump/h5dump.c +++ b/tools/h5dump/h5dump.c @@ -813,7 +813,6 @@ print_datatype(hid_t type,unsigned in_group) /* Check C variable-length string first. Are the two types equal? */ if (H5Tequal(tmp_type, str_type)) { printf("H5T_C_S1;\n"); - H5Tclose(str_type); goto done; } @@ -826,7 +825,6 @@ print_datatype(hid_t type,unsigned in_group) if (H5Tequal(tmp_type, str_type)) { printf("H5T_C_S1;\n"); - H5Tclose(str_type); goto done; } @@ -840,7 +838,6 @@ print_datatype(hid_t type,unsigned in_group) /* Are the two types equal? */ if (H5Tequal(tmp_type, str_type)) { printf("H5T_FORTRAN_S1;\n"); - H5Tclose(str_type); goto done; } @@ -853,15 +850,14 @@ print_datatype(hid_t type,unsigned in_group) if (H5Tequal(tmp_type, str_type)) { printf("H5T_FORTRAN_S1;\n"); - H5Tclose(str_type); goto done; } printf("unknown_one_character_type;\n "); d_status = EXIT_FAILURE; - H5Tclose(str_type); done: + H5Tclose(str_type); H5Tclose(tmp_type); indent -= COL; -- cgit v0.12