From 5e3e8bf91d47db5134d73004a12dbe16984a461c Mon Sep 17 00:00:00 2001 From: Min RK Date: Tue, 1 Oct 2024 11:49:36 +0200 Subject: [PATCH] 3.0: fix support for MPIEXEC_TIMEOUT linter fix for comparison of int to uint resulted in MPIEXEC_TIMEOUT env being ignored Signed-off-by: Min RK bot:notacherrypick --- src/tools/prte/prte.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/tools/prte/prte.c b/src/tools/prte/prte.c index 62ff748566..5c1b7473cc 100644 --- a/src/tools/prte/prte.c +++ b/src/tools/prte/prte.c @@ -256,7 +256,7 @@ int main(int argc, char *argv[]) pmix_info_t *iptr, *iptr2, info; pmix_status_t ret; bool flag; - size_t n, m, ninfo, param_len; + size_t n, ninfo, param_len; pmix_app_t *papps; size_t napps; mylock_t mylock; @@ -1085,11 +1085,11 @@ int main(int argc, char *argv[]) opt = pmix_cmd_line_get_param(&results, PRTE_CLI_TIMEOUT); if (NULL != opt || NULL != (timeoutenv = getenv("MPIEXEC_TIMEOUT"))) { if (NULL != timeoutenv) { - m = strtoul(timeoutenv, NULL, 10); + i = strtol(timeoutenv, NULL, 10); /* both cannot be present, or they must agree */ if (NULL != opt) { - n = strtoul(opt->values[0], NULL, 10); - if (m != n) { + n = strtol(opt->values[0], NULL, 10); + if (i != (int)n) { pmix_show_help("help-prun.txt", "prun:timeoutconflict", false, prte_tool_basename, n, timeoutenv); PRTE_UPDATE_EXIT_STATUS(1);