Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
gosh, sonar still chokes on this single function. Better now?
authorMartin Quinson <martin.quinson@loria.fr>
Fri, 10 Feb 2017 00:09:18 +0000 (01:09 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Fri, 10 Feb 2017 00:09:18 +0000 (01:09 +0100)
src/kernel/activity/SynchroComm.cpp

index 532c591..c08a493 100644 (file)
@@ -74,14 +74,11 @@ void simgrid::kernel::activity::Comm::cancel()
 /**  @brief get the amount remaining from the communication */
 double simgrid::kernel::activity::Comm::remains()
 {
-  switch (state) {
-
-  case SIMIX_RUNNING:
+  if (state == SIMIX_RUNNING)
     return surf_comm->getRemains();
 
-  default:
-    return 0; /*FIXME: check what should be returned */
-  }
+  /* FIXME: check what should be returned in the other cases */
+  return 0;
 }
 
 /** @brief This is part of the cleanup process, probably an internal command */