Browse Source

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 years ago
parent
commit
edf42814c5
1 changed files with 1 additions and 1 deletions
  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) {
     if (NULL == be || NULL == srdn) {
         slapi_log_error(SLAPI_LOG_FATAL, "ldif2dbm",
         slapi_log_error(SLAPI_LOG_FATAL, "ldif2dbm",
                         "_get_and_add_parent_rdns: Empty %s\n",
                         "_get_and_add_parent_rdns: Empty %s\n",
-                        NULL==be?"be":NULL==srdn?"srdn":"unknown");
+                        NULL==be?"be":"srdn");
         return rc;
         return rc;
     }
     }