From ac6f8f6de98ab5fe672a47a37441b729150fe629 Mon Sep 17 00:00:00 2001 From: mrfoxygmfr Date: Thu, 22 May 2025 19:48:43 +0300 Subject: fix(build): now builds with clang --- worker.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'worker.c') diff --git a/worker.c b/worker.c index 08be9bd..c7c560a 100644 --- a/worker.c +++ b/worker.c @@ -20,7 +20,7 @@ long double func_der(long double x) { return 6 * x * x * x * x * x - 75 * x * x long double func_value_x(long double x) { return x; } long double func_der_x(long double x) { - x = x; + x = x * 2; return 1; } @@ -74,7 +74,7 @@ long double calculate_integral(func_t f, long double a, long double b, long doub void worker_func(const char* task, size_t task_size, char** resp, size_t* resp_size) { long double* args = (long double*) task; - task_size = task_size; + task_size = task_size * 2; long double res = calculate_integral(func, args[0], args[1], args[2]); printf("task %Lf %Lf -> %Lf\n", args[0], args[1], res); @@ -85,7 +85,7 @@ void worker_func(const char* task, size_t task_size, char** resp, size_t* resp_s } int32_t main() { - worker_init("127.0.0.1", "33554", 2, worker_func); + worker_init("127.0.0.1", "33554", 1, worker_func); configure_timeout(10); worker_exec(); } -- cgit mrf-deployment