int			found=0, rc, msgid;
int			found=0, rc;
cmp2( LDAP *ld1, LDAP *ld2, LDAPMessage *e1, int findonly){    LDAPMessage		*e2, *res;    char		*dn, *attrcmp;    int			found=0, rc, msgid;    ATTR		*a1, *a2;    dn = ldap_get_dn( ld1, e1 );    if ( ldaptool_verbose ) {	if ( findonly ) {	    printf( "Checking that %s exists on both servers\n", dn );	} else {	    printf("Comparing entry %s on both servers\n", dn );	}    }    if ( ldap_search( ld2, dn, LDAP_SCOPE_BASE, "objectClass=*", NULL, 0 ) == -1 ) {        return( ldaptool_print_lderror( ld2, "ldap_search",		LDAPTOOL_CHECK4SSL_IF_APPROP ));    }/* XXXmcs: this code should be modified to display referrals and references */    while ( (rc = ldap_result( ld2, LDAP_RES_ANY, 0, NULL, &res )) ==         LDAP_RES_SEARCH_ENTRY ) {        e2 = ldap_first_entry( ld1, res );	found = 1;	if ( !findonly ) {	    a1 = get_attrs( ld1, e1 );	    a2 = get_attrs( ld2, e2 );	    attrcmp = cmp_attrs( a1, a2 );	    if ( strcmp( attrcmp, "") != 0 ) {	        printf("\n%s%s\n", dn, attrcmp);	    }	}        ldap_msgfree( res );    }    if ( !found ) {	notfound( dn, findonly );	differ = 1;    }    if ( rc == -1 ) {        return( ldaptool_print_lderror( ld2, "ldap_result",		LDAPTOOL_CHECK4SSL_IF_APPROP ));    }    ldap_msgfree( res );    ldap_memfree( dn );    return(rc);}