barometer plugin: Fix "Allocator sizeof operand mismatch" warning.
authorFlorian Forster <octo@collectd.org>
Fri, 19 Jun 2015 18:03:08 +0000 (20:03 +0200)
committerFlorian Forster <octo@collectd.org>
Fri, 19 Jun 2015 18:03:08 +0000 (20:03 +0200)
src/barometer.c

index ee200b6..a6d9835 100644 (file)
@@ -255,7 +255,7 @@ static averaging_t temperature_averaging = { NULL, 0, 0L, 0 };
  */
 static int averaging_create(averaging_t *avg, int size)
 {
-    avg->ring_buffer = calloc ((size_t) size, sizeof (*avg));
+    avg->ring_buffer = calloc ((size_t) size, sizeof (*avg->ring_buffer));
     if (avg->ring_buffer == NULL)
     {
         ERROR ("barometer: averaging_create - ring buffer allocation of size %d failed",