Explorar o código

Bug 630097 - (cov#15461) Remove unnecessary NULL check in DNA

It is not necessary to check if config_entry->types is NULL since
it is guaranteed to be non-NULL by dna_parse_config_entry() when
it creates config_entry.  Coverity thinks that a NULL derefence is
possible since we are checking if config_entry->types is NULL.  We
should remove this NULL check.
Nathan Kinder %!s(int64=15) %!d(string=hai) anos
pai
achega
b28a60185c
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      ldap/servers/plugins/dna/dna.c

+ 1 - 1
ldap/servers/plugins/dna/dna.c

@@ -2861,7 +2861,7 @@ static int dna_pre_op(Slapi_PBlock * pb, int modtype)
 
 
             if (LDAP_CHANGETYPE_ADD == modtype) {
-                if (config_entry->types && dna_is_multitype_range(config_entry)) {
+                if (dna_is_multitype_range(config_entry)) {
                     /* For a multi-type range, we only generate a value
                      * for types where the magic value is set.  We do not
                      * generate a value for missing types. */