]> arthur.barton.de Git - netdata.git/blobdiff - src/eval.c
Merge pull request #2021 from ktsaou/master
[netdata.git] / src / eval.c
index aeaf9c2bf1c8cf7a3dd554a3fc4ca9ae1becb6a4..122959ce4edb06d6ea99999838e53ec320d1046a 100644 (file)
@@ -77,7 +77,7 @@ static inline calculated_number eval_variable(EVAL_EXPRESSION *exp, EVAL_VARIABL
         critical_hash = simple_hash("CRITICAL");
     }
 
-    if(unlikely(v->hash == this_hash && !strsame(v->name, "this"))) {
+    if(unlikely(v->hash == this_hash && !strcmp(v->name, "this"))) {
         n = (exp->this)?*exp->this:NAN;
         buffer_strcat(exp->error_msg, "[ $this = ");
         print_parsed_as_constant(exp->error_msg, n);
@@ -85,7 +85,7 @@ static inline calculated_number eval_variable(EVAL_EXPRESSION *exp, EVAL_VARIABL
         return n;
     }
 
-    if(unlikely(v->hash == after_hash && !strsame(v->name, "after"))) {
+    if(unlikely(v->hash == after_hash && !strcmp(v->name, "after"))) {
         n = (exp->after && *exp->after)?*exp->after:NAN;
         buffer_strcat(exp->error_msg, "[ $after = ");
         print_parsed_as_constant(exp->error_msg, n);
@@ -93,7 +93,7 @@ static inline calculated_number eval_variable(EVAL_EXPRESSION *exp, EVAL_VARIABL
         return n;
     }
 
-    if(unlikely(v->hash == before_hash && !strsame(v->name, "before"))) {
+    if(unlikely(v->hash == before_hash && !strcmp(v->name, "before"))) {
         n = (exp->before && *exp->before)?*exp->before:NAN;
         buffer_strcat(exp->error_msg, "[ $before = ");
         print_parsed_as_constant(exp->error_msg, n);
@@ -101,7 +101,7 @@ static inline calculated_number eval_variable(EVAL_EXPRESSION *exp, EVAL_VARIABL
         return n;
     }
 
-    if(unlikely(v->hash == now_hash && !strsame(v->name, "now"))) {
+    if(unlikely(v->hash == now_hash && !strcmp(v->name, "now"))) {
         n = now_realtime_sec();
         buffer_strcat(exp->error_msg, "[ $now = ");
         print_parsed_as_constant(exp->error_msg, n);
@@ -109,7 +109,7 @@ static inline calculated_number eval_variable(EVAL_EXPRESSION *exp, EVAL_VARIABL
         return n;
     }
 
-    if(unlikely(v->hash == status_hash && !strsame(v->name, "status"))) {
+    if(unlikely(v->hash == status_hash && !strcmp(v->name, "status"))) {
         n = (exp->status)?*exp->status:RRDCALC_STATUS_UNINITIALIZED;
         buffer_strcat(exp->error_msg, "[ $status = ");
         print_parsed_as_constant(exp->error_msg, n);
@@ -117,7 +117,7 @@ static inline calculated_number eval_variable(EVAL_EXPRESSION *exp, EVAL_VARIABL
         return n;
     }
 
-    if(unlikely(v->hash == removed_hash && !strsame(v->name, "REMOVED"))) {
+    if(unlikely(v->hash == removed_hash && !strcmp(v->name, "REMOVED"))) {
         n = RRDCALC_STATUS_REMOVED;
         buffer_strcat(exp->error_msg, "[ $REMOVED = ");
         print_parsed_as_constant(exp->error_msg, n);
@@ -125,7 +125,7 @@ static inline calculated_number eval_variable(EVAL_EXPRESSION *exp, EVAL_VARIABL
         return n;
     }
 
-    if(unlikely(v->hash == uninitialized_hash && !strsame(v->name, "UNINITIALIZED"))) {
+    if(unlikely(v->hash == uninitialized_hash && !strcmp(v->name, "UNINITIALIZED"))) {
         n = RRDCALC_STATUS_UNINITIALIZED;
         buffer_strcat(exp->error_msg, "[ $UNINITIALIZED = ");
         print_parsed_as_constant(exp->error_msg, n);
@@ -133,7 +133,7 @@ static inline calculated_number eval_variable(EVAL_EXPRESSION *exp, EVAL_VARIABL
         return n;
     }
 
-    if(unlikely(v->hash == undefined_hash && !strsame(v->name, "UNDEFINED"))) {
+    if(unlikely(v->hash == undefined_hash && !strcmp(v->name, "UNDEFINED"))) {
         n = RRDCALC_STATUS_UNDEFINED;
         buffer_strcat(exp->error_msg, "[ $UNDEFINED = ");
         print_parsed_as_constant(exp->error_msg, n);
@@ -141,7 +141,7 @@ static inline calculated_number eval_variable(EVAL_EXPRESSION *exp, EVAL_VARIABL
         return n;
     }
 
-    if(unlikely(v->hash == clear_hash && !strsame(v->name, "CLEAR"))) {
+    if(unlikely(v->hash == clear_hash && !strcmp(v->name, "CLEAR"))) {
         n = RRDCALC_STATUS_CLEAR;
         buffer_strcat(exp->error_msg, "[ $CLEAR = ");
         print_parsed_as_constant(exp->error_msg, n);
@@ -149,7 +149,7 @@ static inline calculated_number eval_variable(EVAL_EXPRESSION *exp, EVAL_VARIABL
         return n;
     }
 
-    if(unlikely(v->hash == warning_hash && !strsame(v->name, "WARNING"))) {
+    if(unlikely(v->hash == warning_hash && !strcmp(v->name, "WARNING"))) {
         n = RRDCALC_STATUS_WARNING;
         buffer_strcat(exp->error_msg, "[ $WARNING = ");
         print_parsed_as_constant(exp->error_msg, n);
@@ -157,7 +157,7 @@ static inline calculated_number eval_variable(EVAL_EXPRESSION *exp, EVAL_VARIABL
         return n;
     }
 
-    if(unlikely(v->hash == critical_hash && !strsame(v->name, "CRITICAL"))) {
+    if(unlikely(v->hash == critical_hash && !strcmp(v->name, "CRITICAL"))) {
         n = RRDCALC_STATUS_CRITICAL;
         buffer_strcat(exp->error_msg, "[ $CRITICAL = ");
         print_parsed_as_constant(exp->error_msg, n);