From b357c96afd42f9bebc42474c623a0c92cef18a47 Mon Sep 17 00:00:00 2001 From: Christian Heinrich Date: Tue, 20 Mar 2018 22:07:18 +0100 Subject: [PATCH] [SMPI] Replay: Macro cosmetics --- src/smpi/internals/smpi_replay.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) 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 { -- 2.20.1