summaryrefslogtreecommitdiffstats
path: root/worker.c
diff options
context:
space:
mode:
authormrfoxygmfr <mrfoxygmfr@sch9.ru>2025-05-22 19:48:43 +0300
committermrfoxygmfr <mrfoxygmfr@sch9.ru>2025-05-22 19:48:43 +0300
commitac6f8f6de98ab5fe672a47a37441b729150fe629 (patch)
tree831310d1d5f24783832e9cd753eac8b138624439 /worker.c
parent1592c5335a3aa157772715a7127cfcb115b5d860 (diff)
fix(build): now builds with clang
Diffstat (limited to 'worker.c')
-rw-r--r--worker.c6
1 files changed, 3 insertions, 3 deletions
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();
}