]> diplodocus.org Git - nmh/commitdiff
m_getfld: Remove never-true test in matchc().
authorRalph Corderoy <ralph@inputplus.co.uk>
Sat, 12 Nov 2016 00:31:36 +0000 (00:31 +0000)
committerRalph Corderoy <ralph@inputplus.co.uk>
Sat, 12 Nov 2016 00:31:36 +0000 (00:31 +0000)
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.

sbr/m_getfld.c

index b4019b0..338ea16 100644 (file)
@@ -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++;