summaryrefslogtreecommitdiff
path: root/string/test-strpbrk.c
diff options
context:
space:
mode:
Diffstat (limited to 'string/test-strpbrk.c')
-rw-r--r--string/test-strpbrk.c14
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)