浏览代码

Bug 630094 - (cov#15459) Remove NULL check for srdn in ldif2ldbm code

In the call to slapi_log_error(), we are guaranteed that srdn is
NULL if we are checking it for NULL due to the way the conditions
are nested. The only time we check if srdn is NULL is if be is
non-NULL, and the if condition guarantees that either be or srdn
are NULL.

We can just use the string "srdn" in our log message if be is
non-NULL.
Nathan Kinder 15 年之前
父节点
当前提交
edf42814c5
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      ldap/servers/slapd/back-ldbm/ldif2ldbm.c

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

@@ -3052,7 +3052,7 @@ _get_and_add_parent_rdns(backend *be,
     if (NULL == be || NULL == srdn) {
         slapi_log_error(SLAPI_LOG_FATAL, "ldif2dbm",
                         "_get_and_add_parent_rdns: Empty %s\n",
-                        NULL==be?"be":NULL==srdn?"srdn":"unknown");
+                        NULL==be?"be":"srdn");
         return rc;
     }