ssequal() does not check for a substring, but for a prefix, so added a
authorJoel Reicher <jjr@panacea.null.org>
Mon, 24 Apr 2006 07:10:03 +0000 (07:10 +0000)
committerJoel Reicher <jjr@panacea.null.org>
Mon, 24 Apr 2006 07:10:03 +0000 (07:10 +0000)
comment to this effect. If this is sufficient, the function body should
remain unchanged but the name and comments should be modified. If not,
then the function needs to be corrected.

sbr/ssequal.c

index 615404a..32edca9 100644 (file)
 #include <h/mh.h>
 
 /*
 #include <h/mh.h>
 
 /*
+ * THIS CODE DOES NOT WORK AS ADVERTISED.
+ * It is actually checking if s1 is a PREFIX of s2.
+ * All calls to this function need to be checked to see
+ * if that needs to be changed. Prefix checking is cheaper, so
+ * should be kept if it's sufficient.
+ */
+
+/*
  * Check if s1 is a substring of s2.
  * If yes, then return 1, else return 0.
  */
  * Check if s1 is a substring of s2.
  * If yes, then return 1, else return 0.
  */