about summary refs log tree commit diff
path: root/benchtests/bench-strcspn.c
diff options
context:
space:
mode:
authorWilco Dijkstra <wdijkstr@arm.com>2018-12-21 18:52:40 +0000
committerWilco Dijkstra <wdijkstr@arm.com>2018-12-21 18:52:40 +0000
commit90d3320d7f57fae3d2f89d907e8307b6a76d133d (patch)
treef9089d25d13b05f53aa2e579c34be4e13f44e857 /benchtests/bench-strcspn.c
parent5d025ea61762c5995abb2273780f4cf28f17cedf (diff)
downloadglibc-90d3320d7f57fae3d2f89d907e8307b6a76d133d.tar.gz
glibc-90d3320d7f57fae3d2f89d907e8307b6a76d133d.tar.xz
glibc-90d3320d7f57fae3d2f89d907e8307b6a76d133d.zip
Refactor string benchtests
Refactor string benchtests by moving duplicated defines into
bench-string.h.

	* benchtests/bench-memchr.c: Cleanup defines.
	* benchtests/bench-memcmp.c: Likewise.
	* benchtests/bench-memset.c: Likewise.
	* benchtests/bench-memset-large.c: Likewise.
	* benchtests/bench-memset-walk.c: Likewise.
	* benchtests/bench-stpcpy.c: Likewise.
	* benchtests/bench-stpncpy.c: Likewise.
	* benchtests/bench-strcat.c: Likewise.
	* benchtests/bench-strchr.c: Likewise.
	* benchtests/bench-strcmp.c: Likewise.
	* benchtests/bench-strcpy.c: Likewise.
	* benchtests/bench-strcspn.c: Likewise.
	* benchtests/bench-string.h: Likewise.
	* benchtests/bench-strlen.c: Likewise.
	* benchtests/bench-strncat.c: Likewise.
	* benchtests/bench-strncmp.c: Likewise.
	* benchtests/bench-strncpy.c: Likewise.
	* benchtests/bench-strnlen.c: Likewise.
	* benchtests/bench-strpbrk.c: Likewise.
	* benchtests/bench-strrchr.c: Likewise.
	* benchtests/bench-strspn.c: Likewise.
Diffstat (limited to 'benchtests/bench-strcspn.c')
-rw-r--r--benchtests/bench-strcspn.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/benchtests/bench-strcspn.c b/benchtests/bench-strcspn.c
index 9b9f7035a9..5ac8a596a7 100644
--- a/benchtests/bench-strcspn.c
+++ b/benchtests/bench-strcspn.c
@@ -27,18 +27,11 @@
 #include "bench-string.h"
 
 #ifndef WIDE
-# define STRCSPN strcspn
-# define CHAR char
 # define SIMPLE_STRCSPN simple_strcspn
 # define STUPID_STRCSPN stupid_strcspn
-# define STRLEN strlen
 #else
-# include <wchar.h>
-# define STRCSPN wcscspn
-# define CHAR wchar_t
 # define SIMPLE_STRCSPN simple_wcscspn
 # define STUPID_STRCSPN stupid_wcscspn
-# define STRLEN wcslen
 #endif /* WIDE */
 
 typedef size_t (*proto_t) (const CHAR *, const CHAR *);
@@ -75,6 +68,4 @@ STUPID_STRCSPN (const CHAR *s, const CHAR *rej)
   return i;
 }
 
-#undef CHAR
-#undef STRLEN
 #include "bench-strpbrk.c"