-/* Copyright (c) 2013-2017. The SimGrid Team.
+/* Copyright (c) 2013-2018. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
#include "simgrid/msg.h"
#include "xbt/dynar.h"
-#include <math.h>
+#include <math.h>
+#include <stdio.h>
XBT_LOG_NEW_DEFAULT_CATEGORY(msg_pastry, "Messages specific for this msg example");
// if the node is ready, do all the pending tasks and send update to known nodes
if (node->ready==0) {
XBT_DEBUG("Node %i is ready!!!", node->id);
- while(xbt_dynar_length(node->pending_tasks)){
+ while (!xbt_dynar_is_empty(node->pending_tasks)) {
msg_task_t task;
xbt_dynar_shift(node->pending_tasks, &task);
handle_task(node, task);