aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Phillips <david@sighup.nz>2017-05-14 20:30:34 +1200
committerDavid Phillips <david@sighup.nz>2017-05-14 20:30:44 +1200
commit1c38e640ec5d0b952099a02387b90b13026d0c9d (patch)
tree74346f7238d70f5116f38a004cb0f7915d259ece
parentc68548b1f399f8f0ccf1290120aa892cfd11fdc7 (diff)
downloadsand-leek-1c38e640ec5d0b952099a02387b90b13026d0c9d.tar.xz
Better sizeofs
-rw-r--r--sand-leek.c4
1 files 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);