summaryrefslogtreecommitdiffstats
path: root/tools/lib/h5diff_array.c
diff options
context:
space:
mode:
authorPedro Vicente Nunes <pvn@hdfgroup.org>2004-07-21 17:50:49 (GMT)
committerPedro Vicente Nunes <pvn@hdfgroup.org>2004-07-21 17:50:49 (GMT)
commit140dfae48a286c2f2a185594ceb49d4c61aa6465 (patch)
tree3d2a6c376670b951b76d067f33cc7ab1a87ed2a8 /tools/lib/h5diff_array.c
parent50a853d807e65a9f2ecdca12bd698fbafe1d97fa (diff)
downloadhdf5-140dfae48a286c2f2a185594ceb49d4c61aa6465.zip
hdf5-140dfae48a286c2f2a185594ceb49d4c61aa6465.tar.gz
hdf5-140dfae48a286c2f2a185594ceb49d4c61aa6465.tar.bz2
[svn-r8912] Purpose:
bug fixes Description: the return error code for a function was not initialized. in HP-UX it happened that this variable was initialized to -1 causing the function to return with an error condtion solution : initialized the variable to 0 the name of the dataset was printed after the differences in verbose mode and report when differences were found solution : check first if differences were found and then print the name of dataset and differences in verbose mode always print the name first Solution: Platforms tested: linux aix solaris Misc. update:
Diffstat (limited to 'tools/lib/h5diff_array.c')
-rw-r--r--tools/lib/h5diff_array.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c
index 51d87d0..73a1fbf 100644
--- a/tools/lib/h5diff_array.c
+++ b/tools/lib/h5diff_array.c
@@ -24,12 +24,13 @@ static hbool_t is_zero(const void *_mem, size_t size);
/*-------------------------------------------------------------------------
* Function: print_data
*
- * Purpose: print data only in report or verbose modes
+ * Purpose: print data only in report or verbose modes,
+ * and do not print in quiet mode
*-------------------------------------------------------------------------
*/
static int print_data(diff_opt_t *options)
-{
- return (options->m_report || options->m_verbose==1)?1:0;
+{
+ return ( (options->m_report || options->m_verbose) && !options->m_quiet)?1:0;
}
/*-------------------------------------------------------------------------
@@ -208,7 +209,7 @@ hsize_t diff_datum(void *_mem1,
H5G_stat_t sb1;
H5G_stat_t sb2;
hsize_t nfound=0; /* differences found */
- int ret;
+ int ret=0; /* check return error */
/* Build default formats for long long types */
sprintf(fmt_llong, "%%%sd %%%sd %%%sd\n",