summaryrefslogtreecommitdiffstats
path: root/tools/h5dump
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2011-01-03 17:28:13 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2011-01-03 17:28:13 (GMT)
commit22ad8ccadd47847719791e62c9b092faaaa319db (patch)
tree077c36de12d41278528fc136ea0e1a2c1526b66d /tools/h5dump
parentef3475d68d4a537e5cb3de96fcac1e45795e659c (diff)
downloadhdf5-22ad8ccadd47847719791e62c9b092faaaa319db.zip
hdf5-22ad8ccadd47847719791e62c9b092faaaa319db.tar.gz
hdf5-22ad8ccadd47847719791e62c9b092faaaa319db.tar.bz2
[svn-r19902] Use an unsigned long long variable to generate the mask instead of a constant.
Tested: windows where it had failed.
Diffstat (limited to 'tools/h5dump')
-rw-r--r--tools/h5dump/h5dump.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c
index 24438a8..d0e7341 100644
--- a/tools/h5dump/h5dump.c
+++ b/tools/h5dump/h5dump.c
@@ -3649,6 +3649,7 @@ parse_mask_list(const char *h_list)
{
const char *ptr;
int offset_value, length_value;
+ unsigned long long temp_mask;
/* sanity check */
HDassert(h_list);
@@ -3713,10 +3714,9 @@ parse_mask_list(const char *h_list)
/* create the bit mask by left shift 1's by length, then negate it. */
/* After packed_mask is calculated, packed_length is not needed but */
/* keep it for debug purpose. */
- if(length_value<8*sizeof(unsigned long long))
- packed_mask[packed_bits_num] = ~(~0L<<length_value);
- else
- packed_mask[packed_bits_num] = ~0L;
+ temp_mask = ~0L;
+ temp_mask = temp_mask << length_value;
+ packed_mask[packed_bits_num] = ~temp_mask;
packed_bits_num++;
/* skip a possible comma separator */