]> arthur.barton.de Git - netdata.git/blobdiff - src/plugins_d.c
reverted strcmp()
[netdata.git] / src / plugins_d.c
index ef7b7e8430f8d85acdff102b26d90eb6efff75dd..276f92e1d955c2d9675172bbb9a363cde0f8e7c3 100644 (file)
@@ -97,7 +97,6 @@ void *pluginsd_worker_thread(void *arg)
 #endif
 
     char *words[MAX_WORDS] = { NULL };
-    uint32_t SET_HASH = simple_hash("SET");
     uint32_t BEGIN_HASH = simple_hash("BEGIN");
     uint32_t END_HASH = simple_hash("END");
     uint32_t FLUSH_HASH = simple_hash("FLUSH");
@@ -141,9 +140,7 @@ void *pluginsd_worker_thread(void *arg)
 
             // debug(D_PLUGINSD, "PLUGINSD: words 0='%s' 1='%s' 2='%s' 3='%s' 4='%s' 5='%s' 6='%s' 7='%s' 8='%s' 9='%s'", words[0], words[1], words[2], words[3], words[4], words[5], words[6], words[7], words[8], words[9]);
 
-            hash = simple_hash(s);
-
-            if(likely(hash == SET_HASH && !strcmp(s, "SET"))) {
+            if(likely(!simple_hash_strcmp(s, "SET", &hash))) {
                 char *dimension = words[1];
                 char *value = words[2];