From cf05c2d76255a3384e1ec057f6fdcaaa7cb46f2b Mon Sep 17 00:00:00 2001 From: Pedro Vicente Nunes Date: Fri, 29 Aug 2008 14:54:21 -0500 Subject: [svn-r15556] Check options for H5Pset_alignment. threshold is zero default (a valid value) but zero is not a valid alignment tested: windows, linux --- tools/h5repack/h5repack.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/tools/h5repack/h5repack.c b/tools/h5repack/h5repack.c index 75684fc..91ade4f 100644 --- a/tools/h5repack/h5repack.c +++ b/tools/h5repack/h5repack.c @@ -430,22 +430,15 @@ static int check_options(pack_opt_t *options) /*-------------------------------------------------------------------------------- - * verify alignment options; both threshold and alignment sizes must be present + * verify alignment options; threshold is zero default but alignment not *--------------------------------------------------------------------------------- */ -#if 0 - if ( options->alignment != 0 && options->threshold == 0 ) - { - error_msg(progname, "threshold for H5Pset_alignment missing\n"); - return -1; - } - + if ( options->alignment == 0 && options->threshold != 0 ) { error_msg(progname, "alignment for H5Pset_alignment missing\n"); return -1; } -#endif return 0; } -- cgit v0.12