From 0d50b4ee9068d04d1d9eb7786e08775d7ba16bc8 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 23 Mar 2008 15:51:52 +0100 Subject: [PATCH] Fix Coverity warnings ID 449, 448, 447, 446, 445, 444, 443, 442, 441, 440, 439, 438, 437 --- source/modules/vfs_audit.c | 6 +++++- source/modules/vfs_extd_audit.c | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/source/modules/vfs_audit.c b/source/modules/vfs_audit.c index a63bf4f6726..cfb4ddf5907 100644 --- a/source/modules/vfs_audit.c +++ b/source/modules/vfs_audit.c @@ -111,7 +111,11 @@ static int audit_syslog_priority(vfs_handle_struct *handle) int priority; - priority = lp_parm_enum(SNUM(handle->conn), "audit", "priority", enum_log_priorities, LOG_NOTICE); + priority = lp_parm_enum(SNUM(handle->conn), "audit", "priority", + enum_log_priorities, LOG_NOTICE); + if (priority == -1) { + priority = LOG_WARNING; + } return priority; } diff --git a/source/modules/vfs_extd_audit.c b/source/modules/vfs_extd_audit.c index a21e281e2ca..926ec362596 100644 --- a/source/modules/vfs_extd_audit.c +++ b/source/modules/vfs_extd_audit.c @@ -114,7 +114,11 @@ static int audit_syslog_priority(vfs_handle_struct *handle) int priority; - priority = lp_parm_enum(SNUM(handle->conn), "extd_audit", "priority", enum_log_priorities, LOG_NOTICE); + priority = lp_parm_enum(SNUM(handle->conn), "extd_audit", "priority", + enum_log_priorities, LOG_NOTICE); + if (priority == -1) { + priority = LOG_WARNING; + } return priority; } -- 2.11.4.GIT