]> git.sur5r.net Git - openldap/commitdiff
cleanup
authorPierangelo Masarati <ando@openldap.org>
Sat, 9 Apr 2005 16:50:07 +0000 (16:50 +0000)
committerPierangelo Masarati <ando@openldap.org>
Sat, 9 Apr 2005 16:50:07 +0000 (16:50 +0000)
servers/slapd/back-dnssrv/referral.c

index 8bd07fcbfcec9a4619f0aa1c9024b7095e3bc594..7a03d3c6b7a933869f070349492d738611b6874a 100644 (file)
@@ -95,11 +95,11 @@ dnssrv_back_referrals(
        for( i=0; hosts[i] != NULL; i++) {
                struct berval url;
 
-               url.bv_len = sizeof("ldap://")-1 + strlen(hosts[i]);
+               url.bv_len = STRLENOF( "ldap://" ) + strlen( hosts[i] );
                url.bv_val = ch_malloc( url.bv_len + 1 );
 
                strcpy( url.bv_val, "ldap://" );
-               strcpy( &url.bv_val[sizeof("ldap://")-1], hosts[i] );
+               strcpy( &url.bv_val[STRLENOF( "ldap://" )], hosts[i] );
 
                if ( ber_bvarray_add( &urls, &url ) < 0 ) {
                        free( url.bv_val );