diff options
author | Ondřej Bílka <neleai@seznam.cz> | 2015-06-29 17:47:01 +0200 |
---|---|---|
committer | Ondřej Bílka <neleai@seznam.cz> | 2015-08-20 09:53:36 +0200 |
commit | 0e974603c566e8e25ffcf8a86d214c400f111090 (patch) | |
tree | fc40bcc79e8bf8df9818fc6546e620db534fd679 /string/test-strpbrk.c | |
parent | 165308eb2c66542c88d002d63dc68df112f5c818 (diff) | |
download | glibc-neleai/string-x64.tar glibc-neleai/string-x64.tar.gz glibc-neleai/string-x64.tar.bz2 glibc-neleai/string-x64.zip |
Improve generic strpbrk.neleai/string-x64
Diffstat (limited to 'string/test-strpbrk.c')
-rw-r--r-- | string/test-strpbrk.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/string/test-strpbrk.c b/string/test-strpbrk.c index b4ac389a71..f389e9dabf 100644 --- a/string/test-strpbrk.c +++ b/string/test-strpbrk.c @@ -32,18 +32,8 @@ IMPL (stupid_strpbrk, 0) IMPL (simple_strpbrk, 0) IMPL (strpbrk, 1) -char * -simple_strpbrk (const char *s, const char *rej) -{ - const char *r; - char c; - - while ((c = *s++) != '\0') - for (r = rej; *r != '\0'; ++r) - if (*r == c) - return (char *) s - 1; - return NULL; -} +#define STRPBRK simple_strpbrk +#include "string/strpbrk.c" char * stupid_strpbrk (const char *s, const char *rej) |