File tree Expand file tree Collapse file tree 4 files changed +7
-5
lines changed
Expand file tree Collapse file tree 4 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ int MPI_Comm_toint(MPI_Comm comm)
4242
4343 if ( MPI_PARAM_CHECK ) {
4444 OMPI_ERR_INIT_FINALIZE (FUNC_NAME );
45- if (ompi_comm_invalid (comm )) {
45+ if (( comm != MPI_COMM_NULL ) && ompi_comm_invalid (comm )) {
4646 return OMPI_ERRHANDLER_NOHANDLE_INVOKE (MPI_ERR_COMM , FUNC_NAME );
4747 }
4848 }
Original file line number Diff line number Diff line change @@ -43,10 +43,12 @@ int MPI_File_toint(MPI_File_ABI_INTERNAL file)
4343{
4444 int o_index ;
4545 ompi_file_t * file_ptr ;
46+ MPI_File file_tmp ;
4647
4748 if ( MPI_PARAM_CHECK ) {
4849 OMPI_ERR_INIT_FINALIZE (FUNC_NAME );
49- if (NULL == file ) {
50+ file_tmp = ompi_convert_abi_file_intern_file (file );
51+ if ((file_tmp != MPI_FILE_NULL ) && ompi_file_invalid (file_tmp )) {
5052 return OMPI_ERRHANDLER_NOHANDLE_INVOKE (MPI_ERR_FILE , FUNC_NAME );
5153 }
5254 }
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ int MPI_File_toint(MPI_File file)
4242
4343 if ( MPI_PARAM_CHECK ) {
4444 OMPI_ERR_INIT_FINALIZE (FUNC_NAME );
45- if (NULL == file ) {
45+ if (( file != MPI_FILE_NULL ) && ompi_file_invalid ( file ) ) {
4646 return OMPI_ERRHANDLER_NOHANDLE_INVOKE (MPI_ERR_FILE , FUNC_NAME );
4747 }
4848 }
Original file line number Diff line number Diff line change @@ -42,8 +42,8 @@ int MPI_Win_toint(MPI_Win win)
4242
4343 if ( MPI_PARAM_CHECK ) {
4444 OMPI_ERR_INIT_FINALIZE (FUNC_NAME );
45- if (ompi_win_invalid ( win ) && MPI_WIN_NULL != win ) {
46- return OMPI_ERRHANDLER_NOHANDLE_INVOKE (MPI_ERR_WIN , FUNC_NAME );
45+ if (( MPI_WIN_NULL != win ) && ompi_win_invalid ( win ) ) {
46+ return OMPI_ERRHANDLER_NOHANDLE_INVOKE (MPI_ERR_WIN , FUNC_NAME );
4747 }
4848 }
4949
You can’t perform that action at this time.
0 commit comments