浏览代码

Ticket #47409 - allow setting db deadlock rejection policy

https://fedorahosted.org/389/ticket/47409
Reviewed by: nhosoi (Thanks!)
Branch: master
Fix Description: Fix coverity CID 11893 (#1 of 1): Unsigned compared against 0 (NO_EFFECT)
val is u_int32_t which is never less than 0
Platforms tested: RHEL6 x86_64
Flag Day: no
Doc impact: yes - document new config parameter
Rich Megginson 12 年之前
父节点
当前提交
989a30bb2d
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      ldap/servers/slapd/back-ldbm/ldbm_config.c

+ 1 - 1
ldap/servers/slapd/back-ldbm/ldbm_config.c

@@ -1407,7 +1407,7 @@ static int ldbm_config_db_deadlock_policy_set(void *arg, void *value, char *erro
     int retval = LDAP_SUCCESS;
     u_int32_t val = (u_int32_t) ((uintptr_t)value);
 
-    if ((val < DB_LOCK_NORUN) || (val > DB_LOCK_YOUNGEST)) {
+    if (val > DB_LOCK_YOUNGEST) {
 	    PR_snprintf(errorbuf, SLAPI_DSE_RETURNTEXT_SIZE,
 	                "Error: Invalid value for %s (%d). Must be between %d and %d inclusive",
 	                CONFIG_DB_DEADLOCK_POLICY, val, DB_LOCK_DEFAULT, DB_LOCK_YOUNGEST);