]> git.sur5r.net Git - openldap/commitdiff
Fix flag initialization
authorHoward Chu <hyc@openldap.org>
Fri, 8 Feb 2002 21:53:04 +0000 (21:53 +0000)
committerHoward Chu <hyc@openldap.org>
Fri, 8 Feb 2002 21:53:04 +0000 (21:53 +0000)
libraries/libldap/dntest.c

index d3610d73c9f862331f8aebc3ca74528b72f176b0..caa03212c95b4f48fe6dafd75e1eb4610c9e9319 100644 (file)
@@ -31,7 +31,7 @@ int
 main( int argc, char *argv[] )
 {
        int             rc, i, debug = 0, f2 = 0;
-       unsigned        flags[ 2 ] = { 0U, LDAP_DN_FORMAT_LDAPV3 };
+       unsigned        flags[ 2 ] = { 0U, 0 };
        char            *strin, *str = NULL, buf[ 1024 ];
        LDAPDN          *dn, *dn2 = NULL;
 
@@ -114,6 +114,9 @@ main( int argc, char *argv[] )
                }
        }
 
+       if ( flags[ 1 ] == 0 )
+               flags[ 1 ] = LDAP_DN_FORMAT_LDAPV3;
+
        f2 = 1;
 
        rc = ldap_str2dn( strin, &dn, flags[ 0 ] );