From: Christian Heinrich Date: Tue, 20 Mar 2018 21:07:18 +0000 (+0100) Subject: [SMPI] Replay: Macro cosmetics X-Git-Tag: v3.20~600^2~37 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/b357c96afd42f9bebc42474c623a0c92cef18a47?hp=684228063a7091913611aba778528e2acb528139 [SMPI] Replay: Macro cosmetics --- diff --git a/src/smpi/internals/smpi_replay.cpp b/src/smpi/internals/smpi_replay.cpp index d1602ed2f3..99e6de89d5 100644 --- a/src/smpi/internals/smpi_replay.cpp +++ b/src/smpi/internals/smpi_replay.cpp @@ -28,12 +28,15 @@ static std::unordered_map*> reqq; static MPI_Datatype MPI_DEFAULT_TYPE; -#define CHECK_ACTION_PARAMS(action, mandatory, optional) {\ - if(action.size()(mandatory+2)) \ - THROWF(arg_error, 0, "%s replay failed.\n" \ - "%lu items were given on the line. First two should be process_id and action. " \ - "This action needs after them %lu mandatory arguments, and accepts %lu optional ones. \n" \ - "Please contact the Simgrid team if support is needed", __FUNCTION__, action.size(), static_cast(mandatory), static_cast(optional));\ +#define CHECK_ACTION_PARAMS(action, mandatory, optional) \ + { \ + if (action.size() < static_cast(mandatory + 2)) \ + THROWF(arg_error, 0, "%s replay failed.\n" \ + "%lu items were given on the line. First two should be process_id and action. " \ + "This action needs after them %lu mandatory arguments, and accepts %lu optional ones. \n" \ + "Please contact the Simgrid team if support is needed", \ + __FUNCTION__, action.size(), static_cast(mandatory), \ + static_cast(optional)); \ } class ReplayActionArg {