From c439bb5d29c2e661d929f43504b3b762284bd753 Mon Sep 17 00:00:00 2001 From: Peter Cao Date: Thu, 27 Jan 2011 09:22:03 -0500 Subject: [svn-r20012] Use "if...else" to exclude the use when travt is null. --- tools/h5repack/h5repack.c | 17 ++++++++--------- 1 file 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; juse_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; -- cgit v0.12