]> arthur.barton.de Git - netdata.git/blobdiff - src/plugins_d.c
improvements identified via static code analysis with cppcheck
[netdata.git] / src / plugins_d.c
index 6af9c21e0aad3e6790f9f40e5ed528fc42aba651..4053653233bb0f181e5723075999e1c8227a5b57 100644 (file)
@@ -121,7 +121,6 @@ void *pluginsd_worker_thread(void *arg)
         info("PLUGINSD: '%s' running on pid %d", cd->fullfilename, cd->pid);
 
         RRDSET *st = NULL;
-        char *s;
         uint32_t hash;
 
         while(likely(fgets(line, PLUGINSD_LINE_MAX, fp) != NULL)) {
@@ -132,7 +131,7 @@ void *pluginsd_worker_thread(void *arg)
             // debug(D_PLUGINSD, "PLUGINSD: %s: %s", cd->filename, line);
 
             int w = pluginsd_split_words(line, words, MAX_WORDS);
-            s = words[0];
+            char *s = words[0];
             if(unlikely(!s || !*s || !w)) {
                 // debug(D_PLUGINSD, "PLUGINSD: empty line");
                 continue;