Skip to content

Commit d45c0d5

Browse files
committed
Use opal_asprintf instead of asprintf
The sessions patch brought in some improper uses of asprintf() with their associated warnings. Update to use opal_asprintf. Signed-off-by: Brian Barrett <bbarrett@amazon.com>
1 parent d38ac4c commit d45c0d5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ompi/communicator/comm.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1470,7 +1470,7 @@ int ompi_intercomm_create_from_groups (ompi_group_t *local_group, int local_lead
14701470
*newintercomm = MPI_COMM_NULL;
14711471

14721472
/* create a local communicator first. create a unique tag for this communicator */
1473-
asprintf (&sub_tag, "%s-OMPIi-%s", tag, OPAL_NAME_PRINT(ompi_group_get_proc_name (local_group, local_leader)));
1473+
opal_asprintf (&sub_tag, "%s-OMPIi-%s", tag, OPAL_NAME_PRINT(ompi_group_get_proc_name (local_group, local_leader)));
14741474
if (OPAL_UNLIKELY(NULL == sub_tag)) {
14751475
return OMPI_ERR_OUT_OF_RESOURCE;
14761476
}
@@ -1507,7 +1507,7 @@ int ompi_intercomm_create_from_groups (ompi_group_t *local_group, int local_lead
15071507
/* create a unique tag for allocating the leader communicator. we can eliminate this step
15081508
* if we take a CID from the newly allocated block belonging to local_comm. this is
15091509
* a note to make this change at a later time. */
1510-
asprintf (&sub_tag, "%s-OMPIi-LC", tag);
1510+
opal_asprintf (&sub_tag, "%s-OMPIi-LC", tag);
15111511
if (OPAL_UNLIKELY(NULL == sub_tag)) {
15121512
ompi_comm_free (&local_comm);
15131513
free(leader_procs);

0 commit comments

Comments
 (0)