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

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

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.3.1
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Fully Compatible
    • ALL
    • Execution Team 2019-09-23
    • 0

      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.

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

              Created:
              Updated:
              Resolved: