From 86f747c627ce96279ab953e7a54ffb8681df778b Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Tue, 8 Jul 2014 20:00:18 +0000 Subject: [PATCH] mca_base_var: use ERR_NOT_FOUND when var is inactive After discussion with Nathan, change the ERR_VALUE_OUT_OF_BOUNDS to be ERR_NOT_FOUND, for two reasons: 1. It's consistent with other uses of ERR_NOT_FOUND in the code. 1. In this case, we could have just looked up a variable that is basically a "hole" -- e.g., var indexes 0, 1, 2 are valid, and 4, 5, and 5 are valid, but 3 is invalid (e.g., 3 was de-registered -- remember that MPI_T explicitly does not allow re-using indexes). So returning ERR_OUT_OF_BOUNDS seems weird -- returning ERR_NOT_FOUND seems a bit more natural. cmr=v1.8.2:ticket=trac:4587 This commit was SVN r32158. The following Trac tickets were found above: Ticket 4587 --> https://svn.open-mpi.org/trac/ompi/ticket/4587 --- opal/mca/base/mca_base_var.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opal/mca/base/mca_base_var.c b/opal/mca/base/mca_base_var.c index b0461ec620..3f2eb8e8a5 100644 --- a/opal/mca/base/mca_base_var.c +++ b/opal/mca/base/mca_base_var.c @@ -424,7 +424,7 @@ int mca_base_var_get_value (int vari, const void *value, } if (!VAR_IS_VALID(var[0])) { - return OPAL_ERR_VALUE_OUT_OF_BOUNDS; + return OPAL_ERR_NOT_FOUND; } if (NULL != value) { @@ -843,7 +843,7 @@ int mca_base_var_get (int vari, const mca_base_var_t **var) } if (!VAR_IS_VALID(*(var[0]))) { - return OPAL_ERR_VALUE_OUT_OF_BOUNDS; + return OPAL_ERR_NOT_FOUND; } return OPAL_SUCCESS;