Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-2189

Fix F_SET / F_ISSET confusion

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • WT2.7.0
    • Affects Version/s: None
    • Component/s: None
    • None

      In WiredTiger we have macros for dealing with bitwise flags called F_SET (to set a flag) and F_ISSET (to check whether a flag is set). It is easy to confuse these two, and accidentally set a flag when intending to check for it.

      Make F_SET (and F_CLR while we're in the neighborhood) into void expressions to avoid this class of bug.

            Assignee:
            michael.cahill@mongodb.com Michael Cahill (Inactive)
            Reporter:
            michael.cahill@mongodb.com Michael Cahill (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: