Skip to content

Commit 6989cb3

Browse files
committed
use more obivous code and safe b/c we hold lock
Signed-off-by: Thomas Naughton <[email protected]>
1 parent 041d5b0 commit 6989cb3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ompi/errhandler/errcode.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ int ompi_mpi_errcode_remove(int errnum)
440440
if (OPAL_SUCCESS == ret) {
441441
if (errnum == ompi_mpi_errcode_lastused) {
442442
ompi_mpi_errcode_lastused--;
443-
ret = errnum - 1; /* lastused w/o lock */
443+
ret = ompi_mpi_errcode_lastused;
444444
}
445445
}
446446
}
@@ -478,7 +478,7 @@ int ompi_mpi_errclass_remove(int errclass)
478478
if (OPAL_SUCCESS == ret) {
479479
if (errclass == ompi_mpi_errcode_lastused) {
480480
ompi_mpi_errcode_lastused--;
481-
ret = errclass - 1; /* lastused w/o lock */
481+
ret = ompi_mpi_errcode_lastused;
482482
}
483483
}
484484
}

0 commit comments

Comments
 (0)