Skip to content

Commit

Permalink
when matching pcre do not switch check rc
Browse files Browse the repository at this point in the history
  • Loading branch information
c9s committed May 23, 2014
1 parent 628f09a commit 591b6cd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/node.c
Original file line number Diff line number Diff line change
Expand Up @@ -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_cnt); /* number of elements in the output vector */

// info("rc: %d\n", rc );
// does not match all edges, return NULL;
if (rc < 0) {
#ifdef DEBUG
printf("pcre rc: %d\n", rc );
switch(rc)
{
case PCRE_ERROR_NOMATCH:
Expand All @@ -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);
break;
}
// does not match all edges, return NULL;
#endif
return NULL;
}

Expand Down

0 comments on commit 591b6cd

Please sign in to comment.