diff --git a/opal/mca/btl/ugni/btl_ugni_module.c b/opal/mca/btl/ugni/btl_ugni_module.c index d9d9861c16..19b29de2bf 100644 --- a/opal/mca/btl/ugni/btl_ugni_module.c +++ b/opal/mca/btl/ugni/btl_ugni_module.c @@ -3,7 +3,7 @@ * Copyright (c) 2011-2015 Los Alamos National Security, LLC. All rights * reserved. * Copyright (c) 2011 UT-Battelle, LLC. All rights reserved. - * Copyright (c) 2014 Research Organization for Information Science + * Copyright (c) 2014-2016 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * @@ -144,13 +144,10 @@ mca_btl_ugni_module_finalize (struct mca_btl_base_module_t *btl) /* close all open connections and release endpoints */ if (ugni_module->initialized) { - rc = opal_hash_table_get_first_key_uint64 (&ugni_module->id_to_endpoint, &key, (void **) &ep, &node); - while (OPAL_SUCCESS == rc) { + OPAL_HASH_TABLE_FOREACH(key, uint64, ep, &ugni_module->id_to_endpoint) { if (NULL != ep) { mca_btl_ugni_release_ep (ep); } - - rc = opal_hash_table_get_next_key_uint64 (&ugni_module->id_to_endpoint, &key, (void **) &ep, node, &node); } if (mca_btl_ugni_component.progress_thread_enabled) { diff --git a/orte/mca/oob/base/oob_base_frame.c b/orte/mca/oob/base/oob_base_frame.c index 5f314cc1f0..cec47c4f96 100644 --- a/orte/mca/oob/base/oob_base_frame.c +++ b/orte/mca/oob/base/oob_base_frame.c @@ -13,7 +13,7 @@ * Copyright (c) 2007 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2013-2014 Los Alamos National Security, LLC. All rights * reserved. - * Copyright (c) 2015 Research Organization for Information Science + * Copyright (c) 2015-2016 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * @@ -79,8 +79,6 @@ static int orte_oob_base_close(void) mca_base_component_list_item_t *cli; opal_object_t *value; uint64_t key; - void *node; - int rc; /* shutdown all active transports */ while (NULL != (cli = (mca_base_component_list_item_t *) opal_list_remove_first (&orte_oob_base.actives))) { @@ -95,14 +93,10 @@ static int orte_oob_base_close(void) OBJ_DESTRUCT(&orte_oob_base.actives); /* release all peers from the hash table */ - rc = opal_hash_table_get_first_key_uint64 (&orte_oob_base.peers, &key, - (void **) &value, &node); - while (OPAL_SUCCESS == rc) { + OPAL_HASH_TABLE_FOREACH(key, uint64, value, &orte_oob_base.peers) { if (NULL != value) { OBJ_RELEASE(value); } - rc = opal_hash_table_get_next_key_uint64 (&orte_oob_base.peers, &key, - (void **) &value, node, &node); } OBJ_DESTRUCT(&orte_oob_base.peers); diff --git a/orte/mca/oob/tcp/oob_tcp.c b/orte/mca/oob/tcp/oob_tcp.c index 1d996e5c17..93fa77b889 100644 --- a/orte/mca/oob/tcp/oob_tcp.c +++ b/orte/mca/oob/tcp/oob_tcp.c @@ -14,6 +14,8 @@ * Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2011 Oak Ridge National Labs. All rights reserved. * Copyright (c) 2013-2016 Intel, Inc. All rights reserved. + * Copyright (c) 2016 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -147,12 +149,10 @@ static void tcp_init(void) static void tcp_fini(void) { uint64_t ui64; - char *nptr; mca_oob_tcp_peer_t *peer; /* cleanup all peers */ - if (OPAL_SUCCESS == opal_hash_table_get_first_key_uint64(&mca_oob_tcp_module.peers, &ui64, - (void**)&peer, (void**)&nptr)) { + OPAL_HASH_TABLE_FOREACH(ui64, uint64, peer, &mca_oob_tcp_module.peers) { opal_output_verbose(2, orte_oob_base_framework.framework_output, "%s RELEASING PEER OBJ %s", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), @@ -160,16 +160,6 @@ static void tcp_fini(void) if (NULL != peer) { OBJ_RELEASE(peer); } - while (OPAL_SUCCESS == opal_hash_table_get_next_key_uint64(&mca_oob_tcp_module.peers, &ui64, - (void**)&peer, nptr, (void**)&nptr)) { - opal_output_verbose(2, orte_oob_base_framework.framework_output, - "%s RELEASING PEER OBJ %s", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), - (NULL == peer) ? "NULL" : ORTE_NAME_PRINT(&peer->name)); - if (NULL != peer) { - OBJ_RELEASE(peer); - } - } } OBJ_DESTRUCT(&mca_oob_tcp_module.peers);