Skip to content

Commit c9ba524

Browse files
committed
Name buffer size in ompi_report_comm_methods
Signed-off-by: Joseph Schuchart <joseph.schuchart@stonybrook.edu>
1 parent f298795 commit c9ba524

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ompi/mca/hook/comm_method/hook_comm_method_fns.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -973,9 +973,9 @@ ompi_report_comm_methods(int called_from_location)
973973
}
974974
}
975975
if (is_nonconformist) {
976-
char *str = malloc(1024);
977-
// int first = 1;
978-
snprintf(str, 1024, " host %d:", i);
976+
const size_t bufsize = 1024;
977+
char *str = malloc(bufsize);
978+
snprintf(str, bufsize, " host %d:", i);
979979
for (k=0; k<NUM_COMM_METHODS; ++k) {
980980
if (method_count[k] > 0) {
981981
// if (!first) {

0 commit comments

Comments
 (0)