From b1919c1826467eb2cfbc972842e0c39c5ab4d92c Mon Sep 17 00:00:00 2001 From: suter Date: Mon, 14 Jan 2013 15:02:34 +0100 Subject: [PATCH] number of unsatisfied dependencies can be negative, using an unsigned int leads to weird outputs by SD_task_dump --- src/simdag/private.h | 2 +- src/simdag/sd_task.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/simdag/private.h b/src/simdag/private.h index db39ef461c..1010a54f93 100644 --- a/src/simdag/private.h +++ b/src/simdag/private.h @@ -89,7 +89,7 @@ typedef struct SD_task { /* dependencies */ xbt_dynar_t tasks_before; xbt_dynar_t tasks_after; - unsigned int unsatisfied_dependencies; + int unsatisfied_dependencies; unsigned int is_not_ready; /* scheduling parameters (only exist in state SD_SCHEDULED) */ diff --git a/src/simdag/sd_task.c b/src/simdag/sd_task.c index 8cd18a8840..3673944cd3 100644 --- a/src/simdag/sd_task.c +++ b/src/simdag/sd_task.c @@ -509,7 +509,7 @@ void SD_task_dump(SD_task_t task) } } XBT_INFO(" - amount: %.0f", SD_task_get_amount(task)); - XBT_INFO(" - Dependencies to satisfy: %u", task->unsatisfied_dependencies); + XBT_INFO(" - Dependencies to satisfy: %d", task->unsatisfied_dependencies); if (!xbt_dynar_is_empty(task->tasks_before)) { XBT_INFO(" - pre-dependencies:"); xbt_dynar_foreach(task->tasks_before, counter, dependency) { -- 2.20.1