Merge branch 'collectd-4.10' into collectd-5.1
[collectd.git] / src / plugin.c
index fac4d77..cdd56bd 100644 (file)
@@ -1733,12 +1733,12 @@ int parse_notif_severity (const char *severity)
 {
        int notif_severity = -1;
 
-       if (strcasecmp (severity, "FAILURE"))
+       if (strcasecmp (severity, "FAILURE") == 0)
                notif_severity = NOTIF_FAILURE;
-       else if (strcmp (severity, "OKAY"))
+       else if (strcmp (severity, "OKAY") == 0)
                notif_severity = NOTIF_OKAY;
-       else if ((strcmp (severity, "WARNING"))
-               || (strcmp (severity, "WARN")))
+       else if ((strcmp (severity, "WARNING") == 0)
+                       || (strcmp (severity, "WARN") == 0))
                notif_severity = NOTIF_WARNING;
 
        return (notif_severity);