diff options
author | Dmitry Mikhirev | 2014-11-17 19:39:59 +0300 |
---|---|---|
committer | Dmitry Mikhirev | 2014-11-17 19:39:59 +0300 |
commit | 210a0a1c5c186fdafaa0847ae259698c557cb2bb (patch) | |
tree | 3958cd55ca200e36ae9e3f472ca9871e024399eb | |
parent | d09171fe28b0b29f90cdf3fe2ebe03c39365cddd (diff) | |
download | make_pcre-210a0a1c5c186fdafaa0847ae259698c557cb2bb.tar.gz make_pcre-210a0a1c5c186fdafaa0847ae259698c557cb2bb.tar.bz2 make_pcre-210a0a1c5c186fdafaa0847ae259698c557cb2bb.tar.xz make_pcre-210a0a1c5c186fdafaa0847ae259698c557cb2bb.zip |
no matching is not a error
-rw-r--r-- | pcre.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -117,7 +117,7 @@ char *match(const char *name, int argc, char **argv) str = gmk_expand(argv[1]); ncap = pcre_exec(re, NULL, str, strlen(str), 0, 0, ovec, MAX_CAP*3); pcre_free(re); - if (ncap < 0) { /* error occured */ + if ((ncap < 0) && (ncap != PCRE_ERROR_NOMATCH)) { /* error occured */ fprintf(stderr, "%s: pattern matching error: %d\n", name, ncap); } |