Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • C ccan
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • mirror
  • ccan
  • Repository
  • ccan
  • ccan
  • darray
  • darray.h
Find file BlameHistoryPermalink
  • Damien Grassart's avatar
    darray: Fix bug in the darray_remove() macro · df8c663a
    Damien Grassart authored Aug 29, 2017
    
    
    The memmove() call should be using the index argument to determine the
    number of bytes to copy. To be consistent with the rest of the code,
    we should also not evaluate the index parameter multiple
    times. Calling this with rand() % arr.size would otherwise generally
    segfault.
    
    Finally, we want to avoid using "index" as an identifier so as to not
    shadow index(3) in the C library.
    
    Signed-off-by: default avatarDamien Grassart <damien@grassart.com>
    Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
    df8c663a
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7