aboutsummaryrefslogtreecommitdiff
path: root/benchtests/bench-memrchr.c
diff options
context:
space:
mode:
Diffstat (limited to 'benchtests/bench-memrchr.c')
-rw-r--r--benchtests/bench-memrchr.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/benchtests/bench-memrchr.c b/benchtests/bench-memrchr.c
index 4f594ee..1f8c884 100644
--- a/benchtests/bench-memrchr.c
+++ b/benchtests/bench-memrchr.c
@@ -21,20 +21,12 @@
#include "bench-string.h"
typedef char *(*proto_t) (const char *, int, size_t);
-char *simple_memrchr (const char *, int, size_t);
-IMPL (simple_memrchr, 0)
-IMPL (memrchr, 1)
+void *
+generic_memrchr (const void *, int, size_t);
-char *
-simple_memrchr (const char *s, int c, size_t n)
-{
- s = s + n;
- while (n--)
- if (*--s == (char) c)
- return (char *) s;
- return NULL;
-}
+IMPL (memrchr, 1)
+IMPL (generic_memrchr, 0)
#define USE_AS_MEMRCHR
#include "bench-memchr.c"