String benchtest cleanup
[platform/upstream/glibc.git] / benchtests / bench-strncasecmp.c
index 6cbab7d..7c97877 100644 (file)
@@ -1,5 +1,5 @@
 /* Measure strncasecmp functions.
-   Copyright (C) 2013-2016 Free Software Foundation, Inc.
+   Copyright (C) 2013-2019 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -23,9 +23,7 @@
 
 typedef int (*proto_t) (const char *, const char *, size_t);
 static int simple_strncasecmp (const char *, const char *, size_t);
-static int stupid_strncasecmp (const char *, const char *, size_t);
 
-IMPL (stupid_strncasecmp, 0)
 IMPL (simple_strncasecmp, 0)
 IMPL (strncasecmp, 1)
 
@@ -48,27 +46,6 @@ simple_strncasecmp (const char *s1, const char *s2, size_t n)
   return ret;
 }
 
-static int
-stupid_strncasecmp (const char *s1, const char *s2, size_t max)
-{
-  size_t ns1 = strlen (s1) + 1;
-  size_t ns2 = strlen (s2) + 1;
-  size_t n = ns1 < ns2 ? ns1 : ns2;
-  if (n > max)
-    n = max;
-  int ret = 0;
-
-  while (n--)
-    {
-      if ((ret = ((unsigned char) tolower (*s1)
-                 - (unsigned char) tolower (*s2))) != 0)
-       break;
-      ++s1;
-      ++s2;
-    }
-  return ret;
-}
-
 static void
 do_one_test (impl_t *impl, const char *s1, const char *s2, size_t n,
             int exp_result)
@@ -204,4 +181,4 @@ test_main (void)
   return ret;
 }
 
-#include "../test-skeleton.c"
+#include <support/test-driver.c>