diff options
author | Wilco Dijkstra <wdijkstr@arm.com> | 2018-12-21 18:52:40 +0000 |
---|---|---|
committer | Wilco Dijkstra <wdijkstr@arm.com> | 2018-12-21 18:52:40 +0000 |
commit | 90d3320d7f57fae3d2f89d907e8307b6a76d133d (patch) | |
tree | f9089d25d13b05f53aa2e579c34be4e13f44e857 /benchtests/bench-strncmp.c | |
parent | Update longlong.h. (diff) | |
download | glibc-90d3320d7f57fae3d2f89d907e8307b6a76d133d.tar.gz glibc-90d3320d7f57fae3d2f89d907e8307b6a76d133d.tar.bz2 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-strncmp.c')
-rw-r--r-- | benchtests/bench-strncmp.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/benchtests/bench-strncmp.c b/benchtests/bench-strncmp.c index 92cf0d2145..65ebb3445d 100644 --- a/benchtests/bench-strncmp.c +++ b/benchtests/bench-strncmp.c @@ -26,14 +26,9 @@ #include "json-lib.h" #ifdef WIDE -# include <wchar.h> - # define L(str) L##str -# define STRNCMP wcsncmp # define SIMPLE_STRNCMP simple_wcsncmp # define STUPID_STRNCMP stupid_wcsncmp -# define CHAR wchar_t -# define CHARBYTES 4 /* Wcsncmp uses signed semantics for comparison, not unsigned. Avoid using substraction since possible overflow. */ @@ -73,11 +68,8 @@ stupid_wcsncmp (const CHAR *s1, const CHAR *s2, size_t n) #else # define L(str) str -# define STRNCMP strncmp # define SIMPLE_STRNCMP simple_strncmp # define STUPID_STRNCMP stupid_strncmp -# define CHAR char -# define CHARBYTES 1 /* Strncmp uses unsigned semantics for comparison. */ int |