diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2012-02-23 19:08:09 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2012-02-23 19:08:09 (GMT) |
commit | 0b4463911f951713d00b9c82f98773f147b6c73b (patch) | |
tree | c764d5d707278c88c709488aeb9046abafee69b4 /tools/h5repack/h5repack_copy.c | |
parent | 9974e02bc07585de4fdfc1f0b2803a7370e37b4e (diff) | |
download | hdf5-0b4463911f951713d00b9c82f98773f147b6c73b.zip hdf5-0b4463911f951713d00b9c82f98773f147b6c73b.tar.gz hdf5-0b4463911f951713d00b9c82f98773f147b6c73b.tar.bz2 |
[svn-r21974] Update HSIZE_T print statements to use correct macro.
Fix some more HD prefix issues in tools.
Tested: local linux
Diffstat (limited to 'tools/h5repack/h5repack_copy.c')
-rw-r--r-- | tools/h5repack/h5repack_copy.c | 88 |
1 files changed, 44 insertions, 44 deletions
diff --git a/tools/h5repack/h5repack_copy.c b/tools/h5repack/h5repack_copy.c index 8b2a1aa..d96e08b 100644 --- a/tools/h5repack/h5repack_copy.c +++ b/tools/h5repack/h5repack_copy.c @@ -131,23 +131,23 @@ int copy_objects(const char* fnamein, goto out; } - if(!options->fs_strategy) - { - if(H5Pget_file_space(fcpl_in, &options->fs_strategy, NULL) < 0) - { - error_msg("failed to retrieve file space strategy\n"); - goto out; - } - } - - if(!options->fs_threshold) - { - if(H5Pget_file_space(fcpl_in, NULL, &options->fs_threshold) < 0) - { - error_msg("failed to retrieve file space threshold\n"); - goto out; - } - } + if(!options->fs_strategy) + { + if(H5Pget_file_space(fcpl_in, &options->fs_strategy, NULL) < 0) + { + error_msg("failed to retrieve file space strategy\n"); + goto out; + } + } + + if(!options->fs_threshold) + { + if(H5Pget_file_space(fcpl_in, NULL, &options->fs_threshold) < 0) + { + error_msg("failed to retrieve file space threshold\n"); + goto out; + } + } if(H5Pclose(fcpl_in) < 0) { @@ -348,28 +348,28 @@ int copy_objects(const char* fnamein, /* either use the FCPL already created or create a new one */ if(fcpl != H5P_DEFAULT) { - /* set file space strategy and free space threshold */ - if(H5Pset_file_space(fcpl, options->fs_strategy, options->fs_threshold) < 0) - { - error_msg("failed to set file space strategy & threshold\n"); - goto out; - } + /* set file space strategy and free space threshold */ + if(H5Pset_file_space(fcpl, options->fs_strategy, options->fs_threshold) < 0) + { + error_msg("failed to set file space strategy & threshold\n"); + goto out; + } } else { - /* create a file creation property list */ - if((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0) - { - error_msg("fail to create a file creation property list\n"); - goto out; - } - - /* set file space strategy and free space threshold */ - if(H5Pset_file_space(fcpl, options->fs_strategy, options->fs_threshold) < 0) - { - error_msg("failed to set file space strategy & threshold \n"); - goto out; - } + /* create a file creation property list */ + if((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0) + { + error_msg("fail to create a file creation property list\n"); + goto out; + } + + /* set file space strategy and free space threshold */ + if(H5Pset_file_space(fcpl, options->fs_strategy, options->fs_threshold) < 0) + { + error_msg("failed to set file space strategy & threshold \n"); + goto out; + } } /*------------------------------------------------------------------------- @@ -618,7 +618,7 @@ int do_copy_objects(hid_t fidin, { case H5TRAV_TYPE_UNKNOWN: - assert(0); + HDassert(0); break; /*------------------------------------------------------------------------- * H5TRAV_TYPE_GROUP @@ -921,7 +921,7 @@ int do_copy_objects(hid_t fidin, size = 1; sm_size[k - 1] = MIN(dims[k - 1], size); sm_nbytes *= sm_size[k - 1]; - assert(sm_nbytes > 0); + HDassert(sm_nbytes > 0); } sm_buf = HDmalloc((size_t)sm_nbytes); @@ -929,8 +929,8 @@ int do_copy_objects(hid_t fidin, sm_space = H5Screate_simple(1, &sm_nelmts, NULL); /* the stripmine loop */ - memset(hs_offset, 0, sizeof hs_offset); - memset(zero, 0, sizeof zero); + HDmemset(hs_offset, 0, sizeof hs_offset); + HDmemset(zero, 0, sizeof zero); for (elmtno = 0; elmtno < p_nelmts; elmtno += hs_nelmts) { @@ -1345,7 +1345,7 @@ copy_user_block(const char *infile, const char *outfile, hsize_t size) int status = 0; /* Return value */ /* User block must be any power of 2 equal to 512 or greater (512, 1024, 2048, etc.) */ - assert(size > 0); + HDassert(size > 0); /* Open files */ if((infid = HDopen(infile, O_RDONLY, 0)) < 0) { @@ -1387,13 +1387,13 @@ copy_user_block(const char *infile, const char *outfile, hsize_t size) status = -1; goto done; } /* end if */ - assert(nwritten > 0); - assert(nwritten <= nbytes); + HDassert(nwritten > 0); + HDassert(nwritten <= nbytes); /* Update # of bytes left & offset in buffer */ nbytes -= nwritten; wbuf += nwritten; - assert(nbytes == 0 || wbuf < (rbuf + USERBLOCK_XFER_SIZE)); + HDassert(nbytes == 0 || wbuf < (rbuf + USERBLOCK_XFER_SIZE)); } /* end while */ /* Update size of userblock left to transfer */ |