Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[sonar] initialization lists and co.
[simgrid.git] / src / simix / simcalls.py
index 01cca20..3ce600d 100755 (executable)
@@ -87,7 +87,7 @@ class Simcall(object):
     def accessors(self):
         res = []
         res.append('')
-        regex = re.compile(r"^boost::intrusive_ptr<(.*?)>(.*)$")  #  to compute the raw type
+        regex = re.compile(r"^boost::intrusive_ptr<(.*?)>(.*)$")  # to compute the raw type
         # Arguments getter/setters
         for i in range(len(self.args)):
             arg = self.args[i]
@@ -135,7 +135,7 @@ class Simcall(object):
         res.append(indent + 'case SIMCALL_%s:' % (self.name.upper()))
         if self.need_handler:
             call = "simcall_HANDLER_%s(&simcall%s%s)" % (self.name,
-                                                        ", " if len(args) > 0 else "",
+                                                        ", " if args else "",
                                                         ', '.join(args))
         else:
             call = "SIMIX_%s(%s)" % (self.name, ', '.join(args))
@@ -178,8 +178,7 @@ class Simcall(object):
                                                                                     self.name,
                                                                                     ''.join(', %s %s' % (arg.rettype(), arg.name)
                                                                                             for i, arg in enumerate(self.args)))
-        else:
-            return ""
+        return ""
 
 
 def parse(fn):
@@ -384,7 +383,7 @@ inline static R simcall(e_smx_simcall_t call, T const&... t)
 {
   smx_actor_t self = SIMIX_process_self();
   simgrid::simix::marshal(&self->simcall, call, t...);
-  if (self != simix_global->maestro_process) {
+  if (self != simix_global->maestro_) {
     XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->get_cname(), SIMIX_simcall_name(self->simcall.call_),
               (int)self->simcall.call_);
     self->yield();