Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of framagit.org:simgrid/simgrid
[simgrid.git] / examples / cpp / mc-bugged1-liveness / s4u-mc-bugged1-liveness.cpp
index f5e9f2c..ad4d30a 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2022. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2012-2023. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -101,8 +101,9 @@ static void client(int id)
     }
 
     auto grant = my_mailbox->get_unique<Message>();
+    xbt_assert(grant->kind == Message::Kind::GRANT);
 
-    if ((id == 1) && (grant->kind == Message::Kind::GRANT)) {
+    if (id == 1) {
       cs = 1;
       r  = 0;
       XBT_INFO("Propositions changed : r=0, cs=1");