From c4b7c287fb8b00c1ad9e4844dbc4afb3389c39be Mon Sep 17 00:00:00 2001 From: Thulinma Date: Sun, 17 Sep 2017 23:37:05 +0200 Subject: [PATCH] Fixed load balancer compile --- src/utils/util_load.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/utils/util_load.cpp b/src/utils/util_load.cpp index 515068b3..af11991d 100644 --- a/src/utils/util_load.cpp +++ b/src/utils/util_load.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include #include @@ -18,12 +18,12 @@ unsigned int weight_cpu = 500; unsigned int weight_ram = 500; unsigned int weight_bw = 1000; unsigned int weight_bonus = 50; -char *hostsCounter = 0; // This is a pointer to guarantee atomic accesses. +unsigned long hostsCounter = 0; // This is a pointer to guarantee atomic accesses. #define HOSTLOOP \ unsigned long i = 0; \ - i < reinterpret_cast(hostsCounter); \ + i < hostsCounter; \ ++i -#define HOST(no) (hosts[reinterpret_cast(no)]) +#define HOST(no) (hosts[no]) #define HOSTCHECK \ if (hosts[i].state != STATE_ONLINE){continue;}