diff options
author | kmu <kmu@hdfgroup.org> | 2019-12-11 16:44:56 (GMT) |
---|---|---|
committer | kmu <kmu@hdfgroup.org> | 2019-12-11 16:44:56 (GMT) |
commit | 45a62b2d46523c15a7d2bc7f52db2b756b40df26 (patch) | |
tree | 9be754803238d1c98cde34ca9d23b3b6e3e7651b /tools/src | |
parent | a00d71b2e26c06a299ac92552b7887ca017fd4d3 (diff) | |
download | hdf5-45a62b2d46523c15a7d2bc7f52db2b756b40df26.zip hdf5-45a62b2d46523c15a7d2bc7f52db2b756b40df26.tar.gz hdf5-45a62b2d46523c15a7d2bc7f52db2b756b40df26.tar.bz2 |
fix and address comments
Diffstat (limited to 'tools/src')
-rw-r--r-- | tools/src/h5import/h5import.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/src/h5import/h5import.c b/tools/src/h5import/h5import.c index 179dac4..f2e264c 100644 --- a/tools/src/h5import/h5import.c +++ b/tools/src/h5import/h5import.c @@ -4709,12 +4709,12 @@ static int process(struct Options *opt) uint16_t swap_uint16(uint16_t val) { - return (uint16_t)(((val & 0xff) << 8) | ((val & 0xff00) >> 8)); + return (uint16_t)((val << 8) | (val >> 8)); } int16_t swap_int16(int16_t val) { - return (uint16_t)(((val & 0xff) << 8) | ((val & 0xff00) >> 8)); + return (uint16_t)((val << 8) | ((val >> 8) & 0xFF)); } uint32_t swap_uint32(uint32_t val) |