Wrap parentheses for str in the MACRO WT_SUFFIX_MATCH

XMLWordPrintableJSON

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

      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
              Reporter:
              Zunyi Liu
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: