Skip to content

Commit f0698b3

Browse files
authored
[libc] fix wcstok() formatting.
1 parent 3adedae commit f0698b3

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

libc/src/wchar/wcstok.cpp

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,13 @@ LLVM_LIBC_FUNCTION(wchar_t *, wcstok,
2424
str = *context;
2525
}
2626

27-
wchar_t *tok_start, *tok_end;
28-
for (tok_start = str; *tok_start != L'\0' && internal::wcschr(delims, *tok_start);
29-
++tok_start)
30-
;
31-
32-
for (tok_end = tok_start; *tok_end != L'\0' && !internal::wcschr(delims, *tok_end);
33-
++tok_end)
34-
;
27+
wchar_t *tok_start = str;
28+
while (*tok_start != L'\0' && internal::wcschr(delims, *tok_start))
29+
++tok_start;
30+
31+
wchar_t *tok_end = tok_start;
32+
while (*tok_end != L'\0' && !internal::wcschr(delims, *tok_end))
33+
++tok_end;
3534

3635
if (*tok_end != L'\0') {
3736
*tok_end = L'\0';

0 commit comments

Comments
 (0)