diff options
author | TheEragon <lordprotector@gmail.com> | 2024-02-09 16:12:44 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-09 15:12:44 +0000 |
commit | cb22012687d33f7e9d7e5d460ae96919e721adf2 (patch) | |
tree | 0143660752ef7c7d1fc11309ce14f049b3b00717 | |
parent | 061de3101e2a79d512ada9f5c4b7a3e7a969cb8f (diff) | |
download | pcre-cb22012687d33f7e9d7e5d460ae96919e721adf2.tar.gz |
Mark pso_list const (#379)
List isn't modified in the code and belongs to read only section and not read write as it was.
-rw-r--r-- | src/pcre2_compile.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pcre2_compile.c b/src/pcre2_compile.c index 69f4fab2..8b364977 100644 --- a/src/pcre2_compile.c +++ b/src/pcre2_compile.c @@ -833,7 +833,7 @@ typedef struct pso { /* NB: STRING_UTFn_RIGHTPAR contains the length as well */ -static pso pso_list[] = { +static const pso pso_list[] = { { (uint8_t *)STRING_UTFn_RIGHTPAR, PSO_OPT, PCRE2_UTF }, { (uint8_t *)STRING_UTF_RIGHTPAR, 4, PSO_OPT, PCRE2_UTF }, { (uint8_t *)STRING_UCP_RIGHTPAR, 4, PSO_OPT, PCRE2_UCP }, @@ -10312,7 +10312,7 @@ if ((options & PCRE2_LITERAL) == 0) for (i = 0; i < sizeof(pso_list)/sizeof(pso); i++) { uint32_t c, pp; - pso *p = pso_list + i; + const pso *p = pso_list + i; if (patlen - skipatstart - 2 >= p->length && PRIV(strncmp_c8)(ptr + skipatstart + 2, (char *)(p->name), |