turbostat plugin: Fix "Undefined allocation of 0 bytes (CERT MEM04-C; CWE-131)" warning.
[collectd.git] / src / rrdtool.c
index bebf468..8497a24 100644 (file)
@@ -743,6 +743,7 @@ static int rrd_cache_insert (const char *filename,
                new_rc = 1;
        }
 
+       assert (value_time > 0); /* plugin_dispatch() ensures this. */
        if (rc->last_value >= value_time)
        {
                pthread_mutex_unlock (&cache_lock);