1
0
Эх сурвалжийг харах

Coverity Issue 12033

CID 12033 (#1 of 1): Unsigned compared against 0 (NO_EFFECT)unsigned_compare: This less-than-zero comparison of an unsigned value is never true. "val < 0UL".

Removed unneccesary comparision introduced by ticket:

https://fedorahosted.org/389/ticket/47499

Reviewed by: richm(Thanks!)
Mark Reynolds 12 жил өмнө
parent
commit
7045c2e855

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

@@ -500,10 +500,6 @@ static int ldbm_config_dbncache_set(void *arg, void *value, char *errorbuf, int
     size_t val = (size_t) ((uintptr_t)value);
     
     if (apply) {
-        if (val < 0) {
-            LDAPDebug( LDAP_DEBUG_ANY,"WARNING: ncache will not take negative value\n", 0, 0, 0);
-            val = 0;
-        } 
         if (!dblayer_is_cachesize_sane(&val)){
             PR_snprintf(errorbuf, SLAPI_DSE_RETURNTEXT_SIZE,
                     "Error: dbncache size value is too large.");
@@ -521,7 +517,7 @@ static int ldbm_config_dbncache_set(void *arg, void *value, char *errorbuf, int
         }
         
     }
-    
+
     return retval;
 }