From 3cab8ec78f5783cfc1e09586e5c8451d81555dc9 Mon Sep 17 00:00:00 2001 From: Matt Strapp Date: Tue, 24 Nov 2020 16:41:10 -0600 Subject: change thing??? --- P3/server.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/P3/server.c b/P3/server.c index 065817e..6659e38 100644 --- a/P3/server.c +++ b/P3/server.c @@ -76,10 +76,9 @@ void *dynamic_pool_size_update(void *arg) { wIndex++; Wargs[i] = i; pthread_create(&wID[i], &attr, worker, (void *)&Wargs[i]); //TODO: Worker arguments - char* threadName = calloc(16,sizeof(char)); + char threadName[16]; sprintf(threadName, "Worker %d", i); pthread_setname_np(wID[i], threadName); - free(threadName); } } free(Wargs); -- cgit v1.2.3