summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjvoisin2017-10-17 17:27:19 +0200
committerjvoisin2017-10-17 17:27:19 +0200
commitda49f804ad5ae283c10ad757cd39bcc212b66f88 (patch)
tree638ff2428ff329fbb25511cf5c62e9b5d8a3eb89 /src
parente63137d4b62704245def3b2703dccdf8a558c7bc (diff)
Use assert instead of sp_log_err for something that shouldn't happen
Diffstat (limited to 'src')
-rw-r--r--src/sp_utils.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/sp_utils.c b/src/sp_utils.c
index 8731164..fdd2b66 100644
--- a/src/sp_utils.c
+++ b/src/sp_utils.c
@@ -42,11 +42,8 @@ zend_always_inline int is_regexp_matching(const pcre* regexp, const char* str) {
42 int vec[30]; 42 int vec[30];
43 int ret = 0; 43 int ret = 0;
44 44
45 if (!regexp || !str) { 45 assert(NULL != regexp);
46 sp_log_err("regexp", "Something went wrong with a regexp (%d:%d).", 46 assert(NULL != str);
47 !regexp?0:1, !str?0:1);
48 return false;
49 }
50 47
51 ret = sp_pcre_exec(regexp, NULL, str, strlen(str), 0, 0, vec, 48 ret = sp_pcre_exec(regexp, NULL, str, strlen(str), 0, 0, vec,
52 sizeof(vec)/sizeof(int)); 49 sizeof(vec)/sizeof(int));