From: Ralph Corderoy Date: Sat, 12 Nov 2016 00:31:36 +0000 (+0000) Subject: m_getfld: Remove never-true test in matchc(). X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/5624ffa652f99d97bfc3c2fe148b569171403427?ds=sidebyside m_getfld: Remove never-true test in matchc(). Now the fdelimlen doesn't include the NUL it is never true. I didn't understand how it could ever be true but gcov on the test suite was showing 22e6 tests had three positives; that's what put me on to fdelimlen's overshoot. --- diff --git a/sbr/m_getfld.c b/sbr/m_getfld.c index b4019b0c..338ea16e 100644 --- a/sbr/m_getfld.c +++ b/sbr/m_getfld.c @@ -907,8 +907,6 @@ matchc(int patln, char *pat, int strln, char *str) while (pc != *str++) if (str > es) return 0; - if (str > es+1) - return 0; sp = str; pp = pat; while (pp < ep && *sp++ == *pp) pp++;