From e4bf33dcabc9871a12dd4c1d42a793cc220b5c0d Mon Sep 17 00:00:00 2001 From: Ralph Castain Date: Sat, 23 Jan 2010 03:57:56 +0000 Subject: [PATCH] Just a slight efficiency improvement - why check a flag twice? This commit was SVN r22472. --- orte/mca/rmcast/udp/rmcast_udp.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/orte/mca/rmcast/udp/rmcast_udp.c b/orte/mca/rmcast/udp/rmcast_udp.c index 06f3200583..930001c63c 100644 --- a/orte/mca/rmcast/udp/rmcast_udp.c +++ b/orte/mca/rmcast/udp/rmcast_udp.c @@ -187,21 +187,20 @@ static int init(void) ORTE_ERROR_LOG(rc); return rc; } + /* setup our grp channel, if one was given */ + if (NULL != orte_rmcast_base.my_group_name) { + channel = orte_rmcast_base.my_group_number; + if (ORTE_SUCCESS != (rc = open_channel(&channel, orte_rmcast_base.my_group_name, + NULL, -1, NULL, ORTE_RMCAST_BIDIR))) { + ORTE_ERROR_LOG(rc); + return rc; + } + my_group_channel = (rmcast_base_channel_t*)opal_list_get_last(&channels); + } } else { opal_output(0, "rmcast:udp:init - unknown process type"); return ORTE_ERR_SILENT; } - - /* finally, if we are an app, setup our grp channel, if one was given */ - if (ORTE_PROC_IS_APP && NULL != orte_rmcast_base.my_group_name) { - channel = orte_rmcast_base.my_group_number; - if (ORTE_SUCCESS != (rc = open_channel(&channel, orte_rmcast_base.my_group_name, - NULL, -1, NULL, ORTE_RMCAST_BIDIR))) { - ORTE_ERROR_LOG(rc); - return rc; - } - my_group_channel = (rmcast_base_channel_t*)opal_list_get_last(&channels); - } return ORTE_SUCCESS; }