Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
hunt down some more short negation forms
[simgrid.git] / src / smpi / smpi_win.cpp
index 0240e93..6ac1654 100644 (file)
@@ -84,7 +84,7 @@ Win::~Win(){
 }
 
 int Win::attach (void *base, MPI_Aint size){
-  if (!(base_ == MPI_BOTTOM || base_ == 0))
+  if (not(base_ == MPI_BOTTOM || base_ == 0))
     return MPI_ERR_ARG;
   base_=0;//actually the address will be given in the RMA calls, as being the disp.
   size_+=size;
@@ -573,8 +573,8 @@ int Win::lock(int lock_type, int rank, int assert){
     if(lock_type == MPI_LOCK_SHARED){//the window used to be exclusive, it's now shared.
       xbt_mutex_release(target_win->lock_mut_);
    }
-  } else if(!(target_win->mode_==MPI_LOCK_SHARED && lock_type == MPI_LOCK_EXCLUSIVE))
-        target_win->mode_+= lock_type; // don't set to exclusive if it's already shared
+  } else if (not(target_win->mode_ == MPI_LOCK_SHARED && lock_type == MPI_LOCK_EXCLUSIVE))
+    target_win->mode_ += lock_type; // don't set to exclusive if it's already shared
 
   target_win->lockers_.push_back(comm_->rank());