Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Parameter for cleanup callback won't be null.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Fri, 1 Nov 2019 23:12:34 +0000 (00:12 +0100)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Sat, 2 Nov 2019 20:20:25 +0000 (21:20 +0100)
examples/deprecated/msg/platform-failures/platform-failures.c
teshsuite/msg/host_on_off_processes/host_on_off_processes.cpp

index c199e82..9ce18b4 100644 (file)
@@ -13,8 +13,7 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test, "Messages specific for this msg example")
 
 static void task_cleanup_handler(void* task)
 {
-  if (task)
-    MSG_task_destroy(task);
+  MSG_task_destroy(task);
 }
 
 static int master(int argc, char *argv[])
index 5c52339..b4a467a 100644 (file)
@@ -15,8 +15,7 @@ int tasks_done = 0;
 
 static void task_cleanup_handler(void* task)
 {
-  if (task)
-    MSG_task_destroy(static_cast<msg_task_t>(task));
+  MSG_task_destroy(static_cast<msg_task_t>(task));
 }
 
 static int process_daemon(int /*argc*/, char** /*argv*/)