소스 검색

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 15 년 전
부모
커밋
b28a60185c
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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. */