X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=src%2Fdaemon%2Fplugin.c;fp=src%2Fdaemon%2Fplugin.c;h=de04665ab3d941eac75d16810f3cd30a7d441012;hp=13d4891d6e77418fbb1f272da30ec8a4a0626b08;hb=3e795a5ff7f079b4d41d582bc97fb3332b727cc9;hpb=a46085676d1c269add9a575f816f0514f96d8419 diff --git a/src/daemon/plugin.c b/src/daemon/plugin.c index 13d4891d..de04665a 100644 --- a/src/daemon/plugin.c +++ b/src/daemon/plugin.c @@ -627,7 +627,7 @@ static void start_read_threads(size_t num) /* {{{ */ if (read_threads != NULL) return; - read_threads = calloc(num, sizeof(pthread_t)); + read_threads = calloc(num, sizeof(*read_threads)); if (read_threads == NULL) { ERROR("plugin: start_read_threads: calloc failed."); return; @@ -816,7 +816,7 @@ static void start_write_threads(size_t num) /* {{{ */ if (write_threads != NULL) return; - write_threads = calloc(num, sizeof(pthread_t)); + write_threads = calloc(num, sizeof(*write_threads)); if (write_threads == NULL) { ERROR("plugin: start_write_threads: calloc failed."); return;