Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • O OpenLDAP
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Bugzilla
    • Bugzilla
  • Merge requests 7
    • Merge requests 7
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • openldap
  • OpenLDAP
  • Repository
Switch branch/tag
  • openldap
  • libraries
  • libldap
  • dnssrv.c
Find file BlameHistoryPermalink
  • Sergio Gelato's avatar
    ITS#8204 Improved RFC2782 shuffle when several, but not all, records have weight 0. · 8006ee58
    Sergio Gelato authored Dec 06, 2015 and Quanah Gibson-Mount's avatar Quanah Gibson-Mount committed Jun 22, 2020
    The fallback to a straight Fisher-Yates shuffle needs to occur whenever the
    sum of the *remaining* weights is zero, or else the remaining records will
    not be reordered. Testing only once at the beginning covers the case when
    all weights are zero, and obviously no shuffling is needed when only one
    weight is zero; but other weight combinations are possible, such as (1, 0, 0).
    8006ee58