فهرست منبع

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;
     }