summaryrefslogtreecommitdiff
path: root/source3/modules
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2008-03-23 15:51:52 +0100
committerVolker Lendecke <vl@samba.org>2008-03-23 16:16:13 +0100
commit527b56182443fb47989bc6fc2108f3f016aa52c4 (patch)
tree10be1f022b5ec93c2ca6cb8eb9b0197ee3216aa3 /source3/modules
parentfe063b7bf5a05cb4f17a093f867801d93459d8d3 (diff)
downloadsamba-527b56182443fb47989bc6fc2108f3f016aa52c4.tar.gz
samba-527b56182443fb47989bc6fc2108f3f016aa52c4.tar.bz2
samba-527b56182443fb47989bc6fc2108f3f016aa52c4.zip
Fix Coverity warnings
ID 449, 448, 447, 446, 445, 444, 443, 442, 441, 440, 439, 438, 437 (This used to be commit 0d50b4ee9068d04d1d9eb7786e08775d7ba16bc8)
Diffstat (limited to 'source3/modules')
-rw-r--r--source3/modules/vfs_audit.c6
-rw-r--r--source3/modules/vfs_extd_audit.c6
2 files changed, 10 insertions, 2 deletions
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;
}