Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1257)

Unified Diff: fusl/src/string/strsep.c

Issue 1714623002: [fusl] clang-format fusl (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: headers too Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: fusl/src/string/strsep.c
diff --git a/fusl/src/string/strsep.c b/fusl/src/string/strsep.c
index cb37c32eb852b9318c40d1feb5f9259660f13b71..2170f1ce0308936e1e939d12a38d0246c9c628e5 100644
--- a/fusl/src/string/strsep.c
+++ b/fusl/src/string/strsep.c
@@ -1,13 +1,15 @@
#define _GNU_SOURCE
#include <string.h>
-char *strsep(char **str, const char *sep)
-{
- char *s = *str, *end;
- if (!s) return NULL;
- end = s + strcspn(s, sep);
- if (*end) *end++ = 0;
- else end = 0;
- *str = end;
- return s;
+char* strsep(char** str, const char* sep) {
+ char *s = *str, *end;
+ if (!s)
+ return NULL;
+ end = s + strcspn(s, sep);
+ if (*end)
+ *end++ = 0;
+ else
+ end = 0;
+ *str = end;
+ return s;
}

Powered by Google App Engine
This is Rietveld 408576698