Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-43257

Don't use sizeof to get size of valarray in GlobalLockServerStatusSection

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 4.3.1
    • None
    • None
    • None
    • Fully Compatible
    • ALL
    • Execution Team 2019-09-23
    • 0

    Description

      This code incorrectly uses sizeof instead of size() to determine the number of elements in the valarray. sizeof returns the size of the type, not the number of elements.

      This does not, and has not caused any bugs, but should be fixed for clarity and correctness.

      Attachments

        Activity

          People

            louis.williams@mongodb.com Louis Williams
            louis.williams@mongodb.com Louis Williams
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: