Oops again: fix use of classpath.c.
[gnulib.git] / lib / strcasecmp.c
index 0ae9627..aa269c6 100644 (file)
@@ -13,7 +13,7 @@
 
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software Foundation,
-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
 #if HAVE_CONFIG_H
 # include <config.h>
@@ -29,7 +29,7 @@
 # define LENGTH_LIMIT_EXPR(Expr) 0
 #endif
 
-#include <sys/types.h>
+#include <stddef.h>
 #include <ctype.h>
 
 #define TOLOWER(Ch) (isupper (Ch) ? tolower (Ch) : (Ch))
@@ -51,11 +51,14 @@ STRXCASECMP_FUNCTION (const char *s1, const char *s2 STRXCASECMP_DECLARE_N)
 
   do
     {
-      c1 = TOLOWER (*p1++);
-      c2 = TOLOWER (*p2++);
+      c1 = TOLOWER (*p1);
+      c2 = TOLOWER (*p2);
 
       if (LENGTH_LIMIT_EXPR (--n == 0) || c1 == '\0')
        break;
+
+      ++p1;
+      ++p2;
     }
   while (c1 == c2);