From fbb4007ac88656122f9319dea4563a3a4fd40e82 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Sat, 7 Oct 2000 23:37:03 +0000 Subject: Update and simplification. --- libc/string/strcspn.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'libc/string/strcspn.c') diff --git a/libc/string/strcspn.c b/libc/string/strcspn.c index 3630a1333..d30195db1 100644 --- a/libc/string/strcspn.c +++ b/libc/string/strcspn.c @@ -33,18 +33,15 @@ /* Return the length of the maximum initial segment of S which contains no characters from REJECT. */ -size_t -strcspn (s, reject) - const char *s; - const char *reject; +size_t strcspn( const char *s, const char *reject) { - size_t count = 0; + size_t count = 0; - while (*s != '\0') - if (strchr (reject, *s++) == NULL) - ++count; - else - return count; + while (*s != '\0') + if (strchr(reject, *s++) == NULL) + ++count; + else + return count; - return count; + return count; } -- cgit v1.2.3