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/strsep.c | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) (limited to 'libc/string/strsep.c') diff --git a/libc/string/strsep.c b/libc/string/strsep.c index f4fdf503e..797807a91 100644 --- a/libc/string/strsep.c +++ b/libc/string/strsep.c @@ -19,21 +19,16 @@ Cambridge, MA 02139, USA. */ #include -char * -strsep(pp, delim) -char **pp; -const char *delim; +char *strsep( char **pp, const char *delim) { - char *p, *q; + char *p, *q; - if (!(p = *pp)) - return 0; - if ((q = strpbrk (p, delim))) - { - *pp = q + 1; - *q = '\0'; - } - else - *pp = 0; - return p; + if (!(p = *pp)) + return 0; + if ((q = strpbrk(p, delim))) { + *pp = q + 1; + *q = '\0'; + } else + *pp = 0; + return p; } -- cgit v1.2.3