X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/f89bb4bc494cb511098326ec3f18adbe0739bf26..cee8b7d98f1c3b6738ad5f0b20de7bed9ba08d5a:/src/smpi/internals/smpi_global.cpp diff --git a/src/smpi/internals/smpi_global.cpp b/src/smpi/internals/smpi_global.cpp index a183594a21..119fe5910f 100644 --- a/src/smpi/internals/smpi_global.cpp +++ b/src/smpi/internals/smpi_global.cpp @@ -325,16 +325,14 @@ static int smpi_run_entry_point(const F& entry_point, const std::string& executa static smpi_entry_point_type smpi_resolve_function(void* handle) { - auto* entry_point_fortran = reinterpret_cast(dlsym(handle, "user_main_")); - if (entry_point_fortran != nullptr) { + if (auto* entry_point_fortran = reinterpret_cast(dlsym(handle, "user_main_"))) { return [entry_point_fortran](int, char**) { entry_point_fortran(); return 0; }; } - auto* entry_point = reinterpret_cast(dlsym(handle, "main")); - if (entry_point != nullptr) { + if (auto* entry_point = reinterpret_cast(dlsym(handle, "main"))) { return entry_point; }