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

Side by Side Diff: fusl/src/stdio/vsscanf.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 unified diff | Download patch
OLDNEW
1 #include "stdio_impl.h" 1 #include "stdio_impl.h"
2 #include "libc.h" 2 #include "libc.h"
3 3
4 static size_t do_read(FILE *f, unsigned char *buf, size_t len) 4 static size_t do_read(FILE* f, unsigned char* buf, size_t len) {
5 { 5 return __string_read(f, buf, len);
6 » return __string_read(f, buf, len);
7 } 6 }
8 7
9 int vsscanf(const char *restrict s, const char *restrict fmt, va_list ap) 8 int vsscanf(const char* restrict s, const char* restrict fmt, va_list ap) {
10 { 9 FILE f = {.buf = (void*)s, .cookie = (void*)s, .read = do_read, .lock = -1};
11 » FILE f = { 10 return vfscanf(&f, fmt, ap);
12 » » .buf = (void *)s, .cookie = (void *)s,
13 » » .read = do_read, .lock = -1
14 » };
15 » return vfscanf(&f, fmt, ap);
16 } 11 }
17 12
18 weak_alias(vsscanf,__isoc99_vsscanf); 13 weak_alias(vsscanf, __isoc99_vsscanf);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698