Procházet zdrojové kódy

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 před 15 roky
rodič
revize
b28a60185c
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  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. */