+/* Licensed under GPLv3+ - see LICENSE file for details */
#include <ccan/lbalance/lbalance.h>
#include <ccan/tlist/tlist.h>
#include <sys/time.h>
* are overloaded. */
static unsigned int best_target(const struct lbalance *lb)
{
- unsigned int i, best = 0, found_drop = 0;
+ unsigned int i, found_drop = 0;
float best_f_max = -1.0, cliff = -1.0;
#if 0
#endif
best_f_max = f - (f / (i + 1)) / 4;
cliff = f - (f / (i + 1)) / 2;
- best = i;
found_drop = 0;
} else if (!found_drop && f < cliff) {
#if 0
{
struct lbalance_task *task;
- while ((task = tlist_top(&lb->tasks, struct lbalance_task, list))) {
+ while ((task = tlist_top(&lb->tasks, list))) {
assert(task->lb == lb);
tlist_del_from(&lb->tasks, task, list);
lb->num_tasks--;