]> git.sur5r.net Git - openldap/blobdiff - libraries/libldap/modify.c
Update PF_INET6 and PF_UNIX detection, both default to auto
[openldap] / libraries / libldap / modify.c
index 71abe8aba1b40af10119037eb91a1d3fefe3d9e1..83a4b67a3e55c5bced91c8a5a0e66035fafe5f8c 100644 (file)
@@ -1,5 +1,6 @@
+/* $OpenLDAP$ */
 /*
- * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+ * Copyright 1998-2000 The OpenLDAP Foundation, All Rights Reserved.
  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
  */
 /*  Portions
@@ -73,11 +74,11 @@ ldap_modify_ext( LDAP *ld,
        Debug( LDAP_DEBUG_TRACE, "ldap_modify_ext\n", 0, 0, 0 );
 
        /* create a message to send */
-       if ( (ber = ldap_alloc_ber_with_options( ld )) == NULLBER ) {
+       if ( (ber = ldap_alloc_ber_with_options( ld )) == NULL ) {
                return( LDAP_NO_MEMORY );
        }
 
-       if ( ber_printf( ber, "{it{s{", ++ld->ld_msgid, LDAP_REQ_MODIFY, dn )
+       if ( ber_printf( ber, "{it{s{" /*}}}*/, ++ld->ld_msgid, LDAP_REQ_MODIFY, dn )
            == -1 ) {
                ld->ld_errno = LDAP_ENCODING_ERROR;
                ber_free( ber, 1 );
@@ -88,10 +89,11 @@ ldap_modify_ext( LDAP *ld,
        for ( i = 0; mods[i] != NULL; i++ ) {
                if (( mods[i]->mod_op & LDAP_MOD_BVALUES) != 0 ) {
                        rc = ber_printf( ber, "{e{s[V]}}",
-                           mods[i]->mod_op & ~LDAP_MOD_BVALUES,
+                           (ber_int_t) ( mods[i]->mod_op & ~LDAP_MOD_BVALUES ),
                            mods[i]->mod_type, mods[i]->mod_bvalues );
                } else {
-                       rc = ber_printf( ber, "{e{s[v]}}", mods[i]->mod_op,
+                       rc = ber_printf( ber, "{e{s[v]}}",
+                               (ber_int_t) mods[i]->mod_op,
                            mods[i]->mod_type, mods[i]->mod_values );
                }
 
@@ -102,7 +104,7 @@ ldap_modify_ext( LDAP *ld,
                }
        }
 
-       if ( ber_printf( ber, "}}" ) == -1 ) {
+       if ( ber_printf( ber, /*{{*/ "}}" ) == -1 ) {
                ld->ld_errno = LDAP_ENCODING_ERROR;
                ber_free( ber, 1 );
                return( ld->ld_errno );
@@ -114,7 +116,7 @@ ldap_modify_ext( LDAP *ld,
                return ld->ld_errno;
        }
 
-       if ( ber_printf( ber, "}" ) == -1 ) {
+       if ( ber_printf( ber, /*{*/ "}" ) == -1 ) {
                ld->ld_errno = LDAP_ENCODING_ERROR;
                ber_free( ber, 1 );
                return( ld->ld_errno );