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

Wrap parentheses for str in the MACRO WT_SUFFIX_MATCH

    • Storage Engines
    • 1
    • StorEng - 2025-01-21

      Currently if str is passed as *strp in WT_SUFFIX_MATCH(str, sfx) it throws error, since strcmp(&str[strlen(str) - strlen(sfx)] in the MACRO is expanded to strcmp(&*strp[strlen(*strp) - strlen(sfx)] which is incorrect. This ticket is to fix that by wrap parentheses to str in the MACRO so it is expanded to strcmp(&(*strp)[strlen(*strp) - strlen(sfx)].

            Assignee:
            zunyi.liu@mongodb.com Zunyi Liu
            Reporter:
            zunyi.liu@mongodb.com Zunyi Liu
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: