Skip to content

Commit fedb139

Browse files
committed
tcp/btl: fix a cast
The current cast is *functional*, but isn't really the way it should be done. This commit makes the cast the way it should be done. Signed-off-by: Jeff Squyres <[email protected]>
1 parent 66feb4b commit fedb139

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

opal/mca/btl/tcp/btl_tcp_proc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ static mca_btl_tcp_interface_t** mca_btl_tcp_retrieve_local_interfaces(mca_btl_t
344344
/* create entry for this kernel index previously not seen */
345345
if (OPAL_SUCCESS != rc) {
346346
index = proc_data->num_local_interfaces++;
347-
opal_hash_table_set_value_uint32(&proc_data->local_kindex_to_index, kindex, (void**) index);
347+
opal_hash_table_set_value_uint32(&proc_data->local_kindex_to_index, kindex, (void*)(uintptr_t) index);
348348

349349
if( proc_data->num_local_interfaces == proc_data->max_local_interfaces ) {
350350
proc_data->max_local_interfaces <<= 1;
@@ -474,7 +474,7 @@ int mca_btl_tcp_proc_insert( mca_btl_tcp_proc_t* btl_proc,
474474

475475
if (OPAL_SUCCESS != rc) {
476476
index = proc_data->num_peer_interfaces++;
477-
opal_hash_table_set_value_uint32(&proc_data->peer_kindex_to_index, endpoint_addr->addr_ifkindex, (void**) index);
477+
opal_hash_table_set_value_uint32(&proc_data->peer_kindex_to_index, endpoint_addr->addr_ifkindex, (void*)(uintptr_t) index);
478478
if( proc_data->num_peer_interfaces == max_peer_interfaces ) {
479479
max_peer_interfaces <<= 1;
480480
peer_interfaces = (mca_btl_tcp_interface_t**)realloc( peer_interfaces,

0 commit comments

Comments
 (0)