]> git.kaiwu.me - haproxy.git/commit
CLEANUP: regex: pre-initialize error variable in regex_comp() to calm analysis master
authorWilly Tarreau <w@1wt.eu>
Mon, 11 May 2026 15:29:56 +0000 (17:29 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 11 May 2026 15:29:56 +0000 (17:29 +0200)
commit648b5b6e50c52dedaa7a7437cbcf07651b7f5d74
tree46912cf119bf1802a48bccf561a3a06a2659f1be
parent57c3e4b4e2496a1ffa71050da287c28ef3f67cb7
CLEANUP: regex: pre-initialize error variable in regex_comp() to calm analysis

In regex_comp(), the error variable is either a const char* (USE_PCRE)
or a a uchar[] (USE_PCRE2), and navigating through the ifdefs is quite a
mess, making it hard to figure if it's always properly initialized when
printing an error message. Let's just preset it to NULL to clarify what
comes from where.
src/regex.c