diff options
author | Volker Lendecke <vl@samba.org> | 2008-03-23 15:51:52 +0100 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2008-03-27 16:20:09 +0100 |
commit | 1f475337c5cdf27862912264e4455b7a407897fe (patch) | |
tree | 63aa2d5e4b6073457452a9a3155da6782f3ead4e /source/modules | |
parent | e25ff9623e58cf5d5960404791b7c66999925b83 (diff) | |
download | samba-1f475337c5cdf27862912264e4455b7a407897fe.tar.gz |
Fix Coverity warnings
ID 449, 448, 447, 446, 445, 444, 443, 442, 441, 440, 439, 438, 437
(cherry picked from commit 0d50b4ee9068d04d1d9eb7786e08775d7ba16bc8)
Diffstat (limited to 'source/modules')
-rw-r--r-- | source/modules/vfs_audit.c | 6 | ||||
-rw-r--r-- | 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; } |