From 538c9cdd7691dcae04a3606d2afcb262fd9b2c78 Mon Sep 17 00:00:00 2001 From: Achim Gsell Date: Fri, 11 Mar 2016 17:54:54 +0100 Subject: [PATCH] src/h5core/h5u_model.c: - h5u_has_view() now returns H5_SUCCESS or H5_NOK --- src/h5core/h5u_model.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/h5core/h5u_model.c b/src/h5core/h5u_model.c index 882cdf6..c92a2de 100644 --- a/src/h5core/h5u_model.c +++ b/src/h5core/h5u_model.c @@ -25,7 +25,7 @@ h5u_get_num_points ( H5_CORE_API_ENTER (h5_ssize_t, "f=%p", f); h5_ssize_t nparticles; - if (h5u_has_view ((h5_file_t)f)) { + if (h5u_has_view ((h5_file_t)f) == H5_OK) { /* if a view exists, use its size as the number of particles */ TRY (nparticles = h5u_get_num_points_in_view (fh)); } else { @@ -45,7 +45,7 @@ h5u_get_num_points_in_view ( H5_CORE_API_ENTER (h5_ssize_t, "f=%p", f); h5_ssize_t nparticles; - if (!h5u_has_view (fh)) { + if (h5u_has_view (fh) != H5_OK) { H5_CORE_API_LEAVE ( h5_error ( H5_ERR_H5PART, @@ -211,7 +211,8 @@ h5u_has_view ( ) { h5_file_p f = (h5_file_p)fh; H5_CORE_API_ENTER (h5_ssize_t, "f=%p", f); - H5_CORE_API_RETURN (f->u->viewindexed || f->u->viewstart >= 0); + h5_err_t result = (f->u->viewindexed || f->u->viewstart >= 0) ? H5_SUCCESS : H5_NOK; + H5_CORE_API_RETURN (result); } h5_err_t