]> arthur.barton.de Git - netdata.git/blobdiff - src/plugin_proc.c
improvements identified via static code analysis with cppcheck
[netdata.git] / src / plugin_proc.c
index 1c461dabd301cb0e8952a2958d2923844b696726..3e19d85a6bbd64e236cae065bffdb80ba45ed40c 100644 (file)
@@ -63,9 +63,9 @@ void *proc_main(void *ptr)
 
     // the next time we will run - aligned properly
     unsigned long long sunext = (time(NULL) - (time(NULL) % rrd_update_every) + rrd_update_every) * 1000000ULL;
-    unsigned long long sunow;
 
     for(;;) {
+        unsigned long long sunow;
         if(unlikely(netdata_exit)) break;
 
         // delay until it is our time to run