From 1c38e640ec5d0b952099a02387b90b13026d0c9d Mon Sep 17 00:00:00 2001 From: David Phillips Date: Sun, 14 May 2017 20:30:34 +1200 Subject: Better sizeofs --- sand-leek.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sand-leek.c b/sand-leek.c index 8ab59d7..d35d0a6 100644 --- a/sand-leek.c +++ b/sand-leek.c @@ -290,13 +290,13 @@ main(int argc, char **argv) { return 1; } - workers = calloc(thread_count, sizeof(pthread_t)); + workers = calloc(thread_count, sizeof(workers[0])); if (!workers) { perror("worker thread calloc"); return 1; } - khashes = calloc(thread_count, sizeof(unsigned long)); + khashes = calloc(thread_count, sizeof(khashes[0])); if (!khashes) { perror("hash count array calloc"); free(workers); -- cgit v1.1