From d12b21e21bc40597d4a5010e5d82521c3ec4f345 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Mon, 19 May 2008 11:57:44 +0000 Subject: [PATCH] Ensure that if an error occurs, we actually return that error rather than an undefined value (which could be 0/OPAL_SUCCESS). This commit was SVN r18452. --- opal/runtime/opal_init.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/opal/runtime/opal_init.c b/opal/runtime/opal_init.c index 6e8c46ac71..49a81e66d9 100644 --- a/opal/runtime/opal_init.c +++ b/opal/runtime/opal_init.c @@ -322,19 +322,19 @@ opal_init(void) } /* initialize the memory manager / tracker */ - if (OPAL_SUCCESS != opal_mem_hooks_init()) { + if (OPAL_SUCCESS != (ret = opal_mem_hooks_init())) { error = "opal_mem_hooks_init"; goto return_error; } /* initialize the memory checker, to allow early support for annotation */ - if (OPAL_SUCCESS != opal_memchecker_base_open()) { + if (OPAL_SUCCESS != (ret = opal_memchecker_base_open())) { error = "opal_memchecker_base_open"; goto return_error; } /* select the memory checker */ - if (OPAL_SUCCESS != opal_memchecker_base_select()) { + if (OPAL_SUCCESS != (ret = opal_memchecker_base_select())) { error = "opal_memchecker_base_select"; goto return_error; } @@ -350,8 +350,15 @@ opal_init(void) } /* setup the carto framework */ - opal_carto_base_open(); - opal_carto_base_select(); + if (OPAL_SUCCESS != (ret = opal_carto_base_open())) { + error = "opal_carto_base_open"; + goto return_error; + } + + if (OPAL_SUCCESS != (ret = opal_carto_base_select())) { + error = "opal_carto_base_select"; + goto return_error; + } /* * Need to start the event and progress engines if noone else is.