when matching pcre do not switch check rc

This commit is contained in:
c9s 2014-05-23 23:00:49 +08:00
parent 628f09a8f4
commit 591b6cd4c1

View file

@ -313,8 +313,10 @@ node * r3_tree_matchl(const node * n, char * path, int path_len, match_entry * e
ov, /* output vector for substring information */ ov, /* output vector for substring information */
ov_cnt); /* number of elements in the output vector */ ov_cnt); /* number of elements in the output vector */
// info("rc: %d\n", rc ); // does not match all edges, return NULL;
if (rc < 0) { if (rc < 0) {
#ifdef DEBUG
printf("pcre rc: %d\n", rc );
switch(rc) switch(rc)
{ {
case PCRE_ERROR_NOMATCH: case PCRE_ERROR_NOMATCH:
@ -326,7 +328,7 @@ node * r3_tree_matchl(const node * n, char * path, int path_len, match_entry * e
printf("pcre matching error '%d' '%s' on pattern '%s'\n", rc, path, n->combined_pattern); printf("pcre matching error '%d' '%s' on pattern '%s'\n", rc, path, n->combined_pattern);
break; break;
} }
// does not match all edges, return NULL; #endif
return NULL; return NULL;
} }