From fcda896923b43d1e16507bd3f915afe17028a60f Mon Sep 17 00:00:00 2001 From: Jan-Oliver Wagner Date: Mon, 5 Oct 2020 11:53:18 +0200 Subject: [PATCH] Drop auto_type_sql use. This remains from merging with master. The auto_type does not exist anymore, so testing it for NULL is not necessary anymore. This case is always true now. --- src/manage_sql.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/manage_sql.c b/src/manage_sql.c index 80ecd98e0..ad0304e25 100644 --- a/src/manage_sql.c +++ b/src/manage_sql.c @@ -21159,8 +21159,7 @@ where_levels_auto (const char *levels, const char *new_severity_sql) // FIX handles dynamic "severity" in caller? levels_sql = g_string_new (""); g_string_append_printf (levels_sql, - " AND (((%s IS NULL) AND (severity_in_level (%s, 'high')", - auto_type_sql, + " AND (((severity_in_level (%s, 'high')", new_severity_sql); } @@ -21171,8 +21170,7 @@ where_levels_auto (const char *levels, const char *new_severity_sql) { levels_sql = g_string_new (""); g_string_append_printf (levels_sql, - " AND (((%s IS NULL) AND (severity_in_level (%s, 'medium')", - auto_type_sql, + " AND (((severity_in_level (%s, 'medium')", new_severity_sql); } else @@ -21189,8 +21187,7 @@ where_levels_auto (const char *levels, const char *new_severity_sql) { levels_sql = g_string_new (""); g_string_append_printf (levels_sql, - " AND (((%s IS NULL) AND (severity_in_level (%s, 'low')", - auto_type_sql, + " AND (((severity_in_level (%s, 'low')", new_severity_sql); } else @@ -21207,8 +21204,7 @@ where_levels_auto (const char *levels, const char *new_severity_sql) { levels_sql = g_string_new (""); g_string_append_printf (levels_sql, - " AND (((%s IS NULL) AND (severity_in_level (%s, 'log')", - auto_type_sql, + " AND (((severity_in_level (%s, 'log')", new_severity_sql); } else