]> diplodocus.org Git - nmh/blobdiff - sbr/strindex.c
Fix invalid pointer arithmetic.
[nmh] / sbr / strindex.c
index 03910fdff32e014603741d6e8fafb198be21d40f..b2bc9ff9f83ff1f0a9cc923754a454adeda2412f 100644 (file)
@@ -1,8 +1,8 @@
-
-/*
- * strindex.c -- "unsigned" lexical index
+/* strindex.c -- "unsigned" lexical index
  *
- * $Id$
+ * This code is Copyright (c) 2002, by the authors of nmh.  See the
+ * COPYRIGHT file in the root directory of the nmh distribution for
+ * complete copyright information.
  */
 
 #include <h/mh.h>
@@ -17,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;
 }