-/* Copyright (c) 2013-2020. The SimGrid Team.
+/* Copyright (c) 2013-2021. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
SD_task_t task;
sg_host_t *hosts = sg_host_list();
- int totalHosts = sg_host_count();
- qsort((void *) hosts, totalHosts, sizeof(sg_host_t), name_compare_hosts);
+ size_t totalHosts = sg_host_count();
+ qsort(hosts, totalHosts, sizeof(sg_host_t), name_compare_hosts);
xbt_dynar_foreach(dax, cursor, task) {
if (SD_task_get_kind(task) == SD_TASK_COMP_SEQ) {
SD_task_schedulel(task, 1, hosts[0]);
} else {
XBT_INFO("Scheduling %s to node: %s", SD_task_get_name(task), sg_host_get_name(hosts[(cursor) % totalHosts]));
- SD_task_schedulel(task, 1, hosts[(cursor) % totalHosts]);
+ SD_task_schedulel(task, 1, hosts[cursor % totalHosts]);
}
}
}