diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2017-02-20 02:28:52 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2017-02-20 02:28:52 (GMT) |
commit | 101fa7af8ebe26ad015b64d3b881df8a9124ccc2 (patch) | |
tree | 5fdb1f02dd14a502cffa330b69c0b87a9fc68e2f /test/use_common.c | |
parent | 4a42b04e592d35d38f1a390a2e56464f7dfc313e (diff) | |
download | hdf5-101fa7af8ebe26ad015b64d3b881df8a9124ccc2.zip hdf5-101fa7af8ebe26ad015b64d3b881df8a9124ccc2.tar.gz hdf5-101fa7af8ebe26ad015b64d3b881df8a9124ccc2.tar.bz2 |
Cleanups and normalizations against incoming page_buffering changes.
Diffstat (limited to 'test/use_common.c')
-rw-r--r-- | test/use_common.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/use_common.c b/test/use_common.c index 99c0bd1..a18601c 100644 --- a/test/use_common.c +++ b/test/use_common.c @@ -69,7 +69,7 @@ parse_option(int argc, char * const argv[]) UC_opts.filename = optarg; break; case 'i': /* iterations */ - if ((UC_opts.iterations = atoi(optarg)) <= 0){ + if ((UC_opts.iterations = HDatoi(optarg)) <= 0) { fprintf(stderr, "bad iterations number %s, must be a positive integer\n", optarg); usage(progname_g); Hgoto_error(-1); @@ -91,28 +91,28 @@ parse_option(int argc, char * const argv[]) } break; case 'n': /* number of planes to write/read */ - if ((UC_opts.nplanes = atoi(optarg)) <= 0){ + if ((UC_opts.nplanes = HDstrtoul(optarg, NULL, 0)) <= 0) { fprintf(stderr, "bad number of planes %s, must be a positive integer\n", optarg); usage(progname_g); Hgoto_error(-1); }; break; case 's': /* use swmr file open mode */ - if ((UC_opts.use_swmr = atoi(optarg)) < 0){ + if ((UC_opts.use_swmr = HDatoi(optarg)) < 0) { fprintf(stderr, "swmr value should be 0(no) or 1(yes)\n"); usage(progname_g); Hgoto_error(-1); }; break; case 'y': /* Number of planes per chunk */ - if ((UC_opts.chunkplanes = atoi(optarg)) <= 0){ + if ((UC_opts.chunkplanes = HDstrtoul(optarg, NULL, 0)) <= 0) { fprintf(stderr, "bad number of planes per chunk %s, must be a positive integer\n", optarg); usage(progname_g); Hgoto_error(-1); }; break; case 'z': /* size of chunk=(z,z) */ - if ((UC_opts.chunksize = atoi(optarg)) <= 0){ + if ((UC_opts.chunksize = HDstrtoull(optarg, NULL, 0)) <= 0) { fprintf(stderr, "bad chunksize %s, must be a positive integer\n", optarg); usage(progname_g); Hgoto_error(-1); @@ -361,7 +361,7 @@ int write_uc_file(hbool_t tosend) bufptr = buffer; for (j=0; j<dims[1]; j++) for (k=0; k<dims[2]; k++) - *bufptr++ = i; + *bufptr++ = (UC_CTYPE)i; /* Cork the dataset's metadata in the cache, if SWMR is enabled */ if(UC_opts.use_swmr) |