summaryrefslogtreecommitdiff
path: root/libc/string/strsep.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/string/strsep.c')
-rw-r--r--libc/string/strsep.c25
1 files changed, 10 insertions, 15 deletions
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 <string.h>
-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;
}