1515 * Copyright (c) 2009-2013 Cisco Systems, Inc. All rights reserved.
1616 * Copyright (c) 2011 Oak Ridge National Labs. All rights reserved.
1717 * Copyright (c) 2013-2015 Intel, Inc. All rights reserved.
18+ * Copyright (c) 2016 Research Organization for Information Science
19+ * and Technology (RIST). All rights reserved.
1820 * $COPYRIGHT$
1921 *
2022 * Additional copyrights may follow
@@ -305,21 +307,21 @@ static int component_set_addr(orte_process_name_t *peer,
305307{
306308 orte_proc_t * proc ;
307309 mca_oob_usock_peer_t * pr ;
308- uint64_t * ui64 ;
310+ uint64_t ui64 ;
309311
312+ memcpy (& ui64 , peer , sizeof (uint64_t ));
310313 /* if I am an application, then everything is addressable
311314 * by me via my daemon
312315 */
313316 if (ORTE_PROC_IS_APP ) {
314317 /* if this is my daemon, then take it - otherwise, ignore */
315318 if (ORTE_PROC_MY_DAEMON -> jobid == peer -> jobid &&
316319 ORTE_PROC_MY_DAEMON -> vpid == peer -> vpid ) {
317- ui64 = (uint64_t * )peer ;
318320 if (OPAL_SUCCESS != opal_hash_table_get_value_uint64 (& mca_oob_usock_module .peers ,
319- ( * ui64 ) , (void * * )& pr ) || NULL == pr ) {
321+ ui64 , (void * * )& pr ) || NULL == pr ) {
320322 pr = OBJ_NEW (mca_oob_usock_peer_t );
321323 pr -> name = * peer ;
322- opal_hash_table_set_value_uint64 (& mca_oob_usock_module .peers , ( * ui64 ) , pr );
324+ opal_hash_table_set_value_uint64 (& mca_oob_usock_module .peers , ui64 , pr );
323325 }
324326 /* we have to initiate the connection because otherwise the
325327 * daemon has no way to communicate to us via this component
@@ -344,12 +346,11 @@ static int component_set_addr(orte_process_name_t *peer,
344346 return ORTE_ERR_TAKE_NEXT_OPTION ;
345347 }
346348 /* indicate that this peer is addressable by this component */
347- ui64 = (uint64_t * )peer ;
348349 if (OPAL_SUCCESS != opal_hash_table_get_value_uint64 (& mca_oob_usock_module .peers ,
349- ( * ui64 ) , (void * * )& pr ) || NULL == pr ) {
350+ ui64 , (void * * )& pr ) || NULL == pr ) {
350351 pr = OBJ_NEW (mca_oob_usock_peer_t );
351352 pr -> name = * peer ;
352- opal_hash_table_set_value_uint64 (& mca_oob_usock_module .peers , ( * ui64 ) , pr );
353+ opal_hash_table_set_value_uint64 (& mca_oob_usock_module .peers , ui64 , pr );
353354 }
354355 return ORTE_SUCCESS ;
355356}
0 commit comments