diff options
author | Peter Cao <xcao@hdfgroup.org> | 2011-01-27 14:22:03 (GMT) |
---|---|---|
committer | Peter Cao <xcao@hdfgroup.org> | 2011-01-27 14:22:03 (GMT) |
commit | c439bb5d29c2e661d929f43504b3b762284bd753 (patch) | |
tree | 20656693a869023754af670eb82c1a03c8e35746 /tools | |
parent | 72938585be6da38a2c11e9fa5b5498dc27eac3f8 (diff) | |
download | hdf5-c439bb5d29c2e661d929f43504b3b762284bd753.zip hdf5-c439bb5d29c2e661d929f43504b3b762284bd753.tar.gz hdf5-c439bb5d29c2e661d929f43504b3b762284bd753.tar.bz2 |
[svn-r20012] Use "if...else" to exclude the use when travt is null.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/h5repack/h5repack.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/tools/h5repack/h5repack.c b/tools/h5repack/h5repack.c index 4c279fd..0f16e87 100644 --- a/tools/h5repack/h5repack.c +++ b/tools/h5repack/h5repack.c @@ -462,8 +462,16 @@ int copy_attr(hid_t loc_in, if(H5Fclose(fidout) < 0) goto error; + } + else + { + if (options->use_native==1) + wtype_id = h5tools_get_native_type(ftype_id); + else + wtype_id = H5Tcopy(ftype_id); } /* end if */ + /* get the dataspace handle */ if ((space_id = H5Aget_space( attr_id )) < 0 ) goto error; @@ -476,15 +484,6 @@ int copy_attr(hid_t loc_in, for (j=0; j<rank; j++) nelmts*=dims[j]; - /* wtype_id will have already been set if using a named dtype */ - if(!is_named) - { - if (options->use_native==1) - wtype_id = h5tools_get_native_type(ftype_id); - else - wtype_id = H5Tcopy(ftype_id); - } /* end if */ - if ((msize=H5Tget_size(wtype_id))==0) goto error; |