X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/95042ad33fe63e1a066916ea1da062752fc67253..adbdcbddadcbd685b72259874d1ebfd9cbbcc497:/src/smpi/bindings/smpi_pmpi_file.cpp diff --git a/src/smpi/bindings/smpi_pmpi_file.cpp b/src/smpi/bindings/smpi_pmpi_file.cpp index 1981ca571e..bf7d6ff1b4 100644 --- a/src/smpi/bindings/smpi_pmpi_file.cpp +++ b/src/smpi/bindings/smpi_pmpi_file.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2007-2022. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2007-2023. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -264,8 +264,7 @@ int PMPI_File_write_at_all(MPI_File fh, MPI_Offset offset, const void *buf, int } int PMPI_File_delete(const char *filename, MPI_Info info){ - if (filename == nullptr) - return MPI_ERR_FILE; + CHECK_NULL(1, MPI_ERR_FILE, filename) const SmpiBenchGuard suspend_bench; int ret = simgrid::smpi::File::del(filename, info); return ret; @@ -371,9 +370,7 @@ int PMPI_File_set_errhandler(MPI_File file, MPI_Errhandler errhandler){ } int PMPI_File_call_errhandler(MPI_File file,int errorcode){ - if (file == nullptr) { - return MPI_ERR_WIN; - } + CHECK_FILE(1, file) MPI_Errhandler err = file->errhandler(); err->call(file, errorcode); simgrid::smpi::Errhandler::unref(err);