From 527b56182443fb47989bc6fc2108f3f016aa52c4 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 23 Mar 2008 15:51:52 +0100 Subject: Fix Coverity warnings ID 449, 448, 447, 446, 445, 444, 443, 442, 441, 440, 439, 438, 437 (This used to be commit 0d50b4ee9068d04d1d9eb7786e08775d7ba16bc8) --- source3/modules/vfs_audit.c | 6 +++++- source3/modules/vfs_extd_audit.c | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'source3') diff --git a/source3/modules/vfs_audit.c b/source3/modules/vfs_audit.c index a63bf4f672..cfb4ddf590 100644 --- a/source3/modules/vfs_audit.c +++ b/source3/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/source3/modules/vfs_extd_audit.c b/source3/modules/vfs_extd_audit.c index a21e281e2c..926ec36259 100644 --- a/source3/modules/vfs_extd_audit.c +++ b/source3/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; } -- cgit