diff options
| author | xXx-caillou-xXx | 2021-01-03 00:11:09 +0100 |
|---|---|---|
| committer | jvoisin | 2021-01-04 20:59:46 +0100 |
| commit | f4e3a800aa5a243464911fc2e9fa81a7848c57f7 (patch) | |
| tree | a8e56382c7236cb1371704404a06039a26a7bc8d /src/sp_pcre_compat.c | |
| parent | 48f927e9694fcfd76d9fe97542359c8b0bd0a46d (diff) | |
Add a check on parameters names
Snuffleupagus will now warn when a particular function
doesn't have the expected parameters configuration-wise.
Diffstat (limited to 'src/sp_pcre_compat.c')
| -rw-r--r-- | src/sp_pcre_compat.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/sp_pcre_compat.c b/src/sp_pcre_compat.c index 283eeb7..509a8ea 100644 --- a/src/sp_pcre_compat.c +++ b/src/sp_pcre_compat.c | |||
| @@ -14,8 +14,7 @@ sp_pcre* sp_pcre_compile(const char* const pattern) { | |||
| 14 | #else | 14 | #else |
| 15 | const char* pcre_error = NULL; | 15 | const char* pcre_error = NULL; |
| 16 | int erroroffset; | 16 | int erroroffset; |
| 17 | ret = | 17 | ret = pcre_compile(pattern, PCRE_CASELESS, &pcre_error, &erroroffset, NULL); |
| 18 | pcre_compile(pattern, PCRE_CASELESS, &pcre_error, &erroroffset, NULL); | ||
| 19 | #endif | 18 | #endif |
| 20 | 19 | ||
| 21 | if (NULL == ret) { | 20 | if (NULL == ret) { |
| @@ -38,8 +37,7 @@ bool ZEND_HOT sp_is_regexp_matching_len(const sp_pcre* regexp, const char* str, | |||
| 38 | ret = pcre2_match(regexp, (PCRE2_SPTR)str, len, 0, 0, match_data, NULL); | 37 | ret = pcre2_match(regexp, (PCRE2_SPTR)str, len, 0, 0, match_data, NULL); |
| 39 | #else | 38 | #else |
| 40 | int vec[30]; | 39 | int vec[30]; |
| 41 | ret = pcre_exec(regexp, NULL, str, len, 0, 0, vec, | 40 | ret = pcre_exec(regexp, NULL, str, len, 0, 0, vec, sizeof(vec) / sizeof(int)); |
| 42 | sizeof(vec) / sizeof(int)); | ||
| 43 | #endif | 41 | #endif |
| 44 | 42 | ||
| 45 | if (ret < 0) { | 43 | if (ret < 0) { |
