]> diplodocus.org Git - nmh/blobdiff - sbr/strindex.c
Fix invalid pointer arithmetic.
[nmh] / sbr / strindex.c
index 9a1e4fe7b5d999b6ded5b000fb636d3df4f79985..b2bc9ff9f83ff1f0a9cc923754a454adeda2412f 100644 (file)
@@ -1,6 +1,4 @@
-
-/*
- * strindex.c -- "unsigned" lexical index
+/* strindex.c -- "unsigned" lexical index
  *
  * This code is Copyright (c) 2002, by the authors of nmh.  See the
  * COPYRIGHT file in the root directory of the nmh distribution for
@@ -19,7 +17,7 @@ stringdex (char *p1, char *p2)
 
     for (p = p2; *p; p++)
        if (uprf (p, p1))
-           return (p - p2);
+           return p - p2;
 
     return -1;
 }