diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2011-05-25 15:14:06 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2011-05-25 15:14:06 (GMT) |
commit | 1fd585a5a0644a5c0dd4ee5e18b40686fa9ec5a5 (patch) | |
tree | a937c00a0bf6ebcb43f73d09a58611150d14321e /hl/src | |
parent | e082497e0cf285a1cedb30c1b011941ce81761fe (diff) | |
download | hdf5-1fd585a5a0644a5c0dd4ee5e18b40686fa9ec5a5.zip hdf5-1fd585a5a0644a5c0dd4ee5e18b40686fa9ec5a5.tar.gz hdf5-1fd585a5a0644a5c0dd4ee5e18b40686fa9ec5a5.tar.bz2 |
[svn-r20901] Remove if() that avoided a copy of the last element to itself. This was to solve an issue of a difference between 1.8 and trunk. 1.8 used the wrong variable in the if() and upon reflection the if() was determined to be unnecessary and complicated the logic. 1.8 tests would have treated the if() as always true with the result being the same as though the if() was absent.
This change reflects that equivalance and will avoid a potential problem in 1.8.
Tested: local linux, reviewed by two developers
Diffstat (limited to 'hl/src')
-rw-r--r-- | hl/src/H5DS.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/hl/src/H5DS.c b/hl/src/H5DS.c index 16ab14f..379b220 100644 --- a/hl/src/H5DS.c +++ b/hl/src/H5DS.c @@ -813,10 +813,8 @@ herr_t H5DSdetach_scale(hid_t did, /* same object, reset. we want to detach only for this DIM */ if(did_oi.fileno == tmp_oi.fileno && did_oi.addr == tmp_oi.addr) { - /* if we found not the last one, copy the last one to replace - the one which is found */ - if(ii < nelmts-1) - dsbuf[ii] = dsbuf[nelmts-1]; + /* copy the last one to replace the one which is found */ + dsbuf[ii] = dsbuf[nelmts-1]; nelmts--; found_dset=1; break; |