From 258864c23d070467ce222d3fa78aeb63e849c47c Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Sat, 2 Nov 2019 00:12:34 +0100 Subject: [PATCH] Parameter for cleanup callback won't be null. --- examples/deprecated/msg/platform-failures/platform-failures.c | 3 +-- teshsuite/msg/host_on_off_processes/host_on_off_processes.cpp | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/examples/deprecated/msg/platform-failures/platform-failures.c b/examples/deprecated/msg/platform-failures/platform-failures.c index c199e829c9..9ce18b4249 100644 --- a/examples/deprecated/msg/platform-failures/platform-failures.c +++ b/examples/deprecated/msg/platform-failures/platform-failures.c @@ -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[]) diff --git a/teshsuite/msg/host_on_off_processes/host_on_off_processes.cpp b/teshsuite/msg/host_on_off_processes/host_on_off_processes.cpp index 5c52339d82..b4a467a306 100644 --- a/teshsuite/msg/host_on_off_processes/host_on_off_processes.cpp +++ b/teshsuite/msg/host_on_off_processes/host_on_off_processes.cpp @@ -15,8 +15,7 @@ int tasks_done = 0; static void task_cleanup_handler(void* task) { - if (task) - MSG_task_destroy(static_cast(task)); + MSG_task_destroy(static_cast(task)); } static int process_daemon(int /*argc*/, char** /*argv*/) -- 2.20.1