- if (function == nullptr || op == nullptr) {
- return MPI_ERR_ARG;
- } else {
- *op = new simgrid::smpi::Op(function, (commute!=0));
- return MPI_SUCCESS;
- }
+ CHECK_NULL(1, MPI_ERR_ARG, function)
+ CHECK_NULL(3, MPI_ERR_ARG, op)
+ *op = new simgrid::smpi::Op(function, (commute!=0));
+ return MPI_SUCCESS;