]> git.sur5r.net Git - openldap/blobdiff - libraries/libldap/modrdn.c
ITS#3755 silence strict-aliasing warnings
[openldap] / libraries / libldap / modrdn.c
index 694e9c4a6da8e71449ded72e7e80409bbc33daf6..2973b12ecdf588f0e8befd997fd2da56404cddf8 100644 (file)
@@ -1,7 +1,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2003 The OpenLDAP Foundation.
+ * Copyright 1998-2006 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * without restriction or fee of any kind as long as this notice
  * is preserved.
  */
-/* Portions Copyright (C) The Internet Society (1997)
- * ASN.1 fragments are from RFC 2251; see RFC for full legal notices.
- */
 
 /* ACKNOWLEDGEMENTS:
  *     Juan C. Gomez
  */
 
+#include "portable.h"
+
+#include <stdio.h>
+
+#include <ac/socket.h>
+#include <ac/string.h>
+#include <ac/time.h>
+
+#include "ldap-int.h"
+
 /*
  * A modify rdn request looks like this:
  *     ModifyRDNRequest ::= SEQUENCE {
  *     }
  */
 
-#include "portable.h"
-
-#include <stdio.h>
-
-#include <ac/socket.h>
-#include <ac/string.h>
-#include <ac/time.h>
-
-#include "ldap-int.h"
 
 /*
  * ldap_rename - initiate an ldap extended modifyDN operation.
@@ -79,11 +77,7 @@ ldap_rename(
        int rc;
        ber_int_t id;
 
-#ifdef NEW_LOGGING
-       LDAP_LOG ( OPERATION, ENTRY, "ldap_rename\n", 0, 0, 0 );
-#else
        Debug( LDAP_DEBUG_TRACE, "ldap_rename\n", 0, 0, 0 );
-#endif
 
        /* check client controls */
        rc = ldap_int_client_controls( ld, cctrls );
@@ -166,11 +160,7 @@ ldap_rename2(
        int msgid;
        int rc;
 
-#ifdef NEW_LOGGING
-       LDAP_LOG ( OPERATION, ENTRY, "ldap_rename2\n", 0, 0, 0 );
-#else
        Debug( LDAP_DEBUG_TRACE, "ldap_rename2\n", 0, 0, 0 );
-#endif
 
        rc = ldap_rename( ld, dn, newrdn, newSuperior,
                deleteoldrdn, NULL, NULL, &msgid );
@@ -227,7 +217,7 @@ ldap_rename_s(
                return rc;
        }
 
-       rc = ldap_result( ld, msgid, 1, NULL, &res );
+       rc = ldap_result( ld, msgid, LDAP_MSG_ALL, NULL, &res );
 
        if( rc == -1 ) {
                return ld->ld_errno;